--------------------------------------------------------
--  File created - Friday-November-13-2015   
--------------------------------------------------------
--------------------------------------------------------
--  DDL for Table DIR_LIST
--------------------------------------------------------

  CREATE GLOBAL TEMPORARY TABLE "DIR_LIST" 
   (	"FILENAME" VARCHAR2(1024 BYTE)
   ) ON COMMIT DELETE ROWS ;
--------------------------------------------------------
--  DDL for Table TB_APP_ERROR
--------------------------------------------------------

  CREATE TABLE "TB_APP_ERROR" 
   (	"NAME" VARCHAR2(500 BYTE), 
	"MSG" VARCHAR2(4000 BYTE), 
	"LINE" VARCHAR2(4000 BYTE), 
	"CDATE" VARCHAR2(10 BYTE) DEFAULT TO_CHAR(sysdate,'YYYYMMDD'), 
	"CTIME" DATE DEFAULT sysdate, 
	"SO_TRANSFER_FLAG" VARCHAR2(1 BYTE) DEFAULT 'N', 
	"SO_TRANSFER_DATE" DATE
   ) ;
--------------------------------------------------------
--  DDL for Table TB_CM_AC_INSTALLER_INF
--------------------------------------------------------

  CREATE TABLE "TB_CM_AC_INSTALLER_INF" 
   (	"INST_CODE" VARCHAR2(10 BYTE), 
	"INST_NAME" VARCHAR2(100 BYTE), 
	"BILLTO_CODE" VARCHAR2(50 BYTE), 
	"PRV_CODE" VARCHAR2(5 BYTE), 
	"DIST_CODE" VARCHAR2(5 BYTE), 
	"CELL#" VARCHAR2(20 BYTE), 
	"SMS_CELL#" VARCHAR2(20 BYTE), 
	"EMAIL_ADD" VARCHAR2(30 BYTE), 
	"USE_FLAG" VARCHAR2(1 BYTE) DEFAULT 'Y', 
	"CREATE_DATE" DATE, 
	"GENDER" VARCHAR2(10 BYTE), 
	"DOB" DATE, 
	"EXPERIENCE" VARCHAR2(4000 BYTE), 
	"CREATE_USER" VARCHAR2(20 BYTE), 
	"UPDATE_DATE" DATE DEFAULT SYSDATE, 
	"REGION" VARCHAR2(2 BYTE), 
	"CONTACTOR_NAME" VARCHAR2(100 BYTE), 
	"SMS_YN" VARCHAR2(1 BYTE) DEFAULT 'N'
   ) ;
--------------------------------------------------------
--  DDL for Table TB_CM_BILLTO_INF
--------------------------------------------------------

  CREATE TABLE "TB_CM_BILLTO_INF" 
   (	"BILLTO_CODE" VARCHAR2(50 BYTE), 
	"PROFILE" VARCHAR2(50 BYTE), 
	"SHORT_NAME" VARCHAR2(200 BYTE), 
	"FULL_NAME" VARCHAR2(500 BYTE), 
	"REPRESENTATIVE" VARCHAR2(200 BYTE), 
	"BIZ_NO" VARCHAR2(50 BYTE), 
	"TAX_ID" VARCHAR2(100 BYTE), 
	"CUSTOMER_CODE" VARCHAR2(50 BYTE), 
	"ADDRESS" VARCHAR2(1000 BYTE), 
	"CREDIT_LEVEL" VARCHAR2(50 BYTE), 
	"GRADE" VARCHAR2(50 BYTE), 
	"HIGH_SALE_CHANNEL" VARCHAR2(200 BYTE), 
	"PAY_FROM" VARCHAR2(50 BYTE), 
	"LOW_PRICE_GROUP" VARCHAR2(200 BYTE), 
	"HIGH_PRICE_GROUP" VARCHAR2(200 BYTE), 
	"VN_DEPARTMENT" VARCHAR2(100 BYTE), 
	"AVTIVE" VARCHAR2(50 BYTE), 
	"LOW_SALE_CHANNEL" VARCHAR2(200 BYTE), 
	"BUYING_GROUP" VARCHAR2(200 BYTE), 
	"SO_TRANSFER_FLAG" VARCHAR2(1 BYTE) DEFAULT 'N', 
	"SO_TRANSFER_DATE" DATE
   ) ;
--------------------------------------------------------
--  DDL for Table TB_CM_DISTRICT
--------------------------------------------------------

  CREATE TABLE "TB_CM_DISTRICT" 
   (	"ID" NUMBER(10,0), 
	"PROVINCE_ID" NUMBER(10,0), 
	"NAME" VARCHAR2(50 BYTE), 
	"LNG" FLOAT(126), 
	"LAT" FLOAT(126), 
	"ENTRY_USER_ID" NUMBER(10,0), 
	"ENTRY_USER_NAME" VARCHAR2(50 BYTE), 
	"ENTRY_DATE_TIME" DATE, 
	"UPDATE_USER_ID" NUMBER(10,0), 
	"UPDATE_USER_NAME" VARCHAR2(50 BYTE), 
	"UPDATE_DATE_TIME" DATE
   ) ;
--------------------------------------------------------
--  DDL for Table TB_CM_INCENTIVE_ADHOC
--------------------------------------------------------

  CREATE TABLE "TB_CM_INCENTIVE_ADHOC" 
   (	"SCHEME_ID" VARCHAR2(12 BYTE), 
	"SCHEME_NAME" VARCHAR2(100 BYTE), 
	"START_DATE" DATE, 
	"END_DATE" DATE, 
	"PURPOSE" VARCHAR2(1000 BYTE), 
	"CREATE_DATE" DATE DEFAULT sysdate, 
	"CREATE_USER" VARCHAR2(10 BYTE), 
	"UPDATE_DATE" DATE DEFAULT sysdate, 
	"REGION" VARCHAR2(2 BYTE) DEFAULT 00, 
	"CLOSE_FLAG" VARCHAR2(2 BYTE) DEFAULT 'N', 
	"CLOSE_USER" VARCHAR2(10 BYTE), 
	"CLOSE_DATE" DATE, 
	"MDI" VARCHAR2(1 BYTE) DEFAULT 'T', 
	"PURPOSE_TYPE" VARCHAR2(1 BYTE), 
	"BILLTO_CODE" VARCHAR2(100 BYTE), 
	"BILLTO_YN" VARCHAR2(1 BYTE) DEFAULT 'N'
   ) ;
--------------------------------------------------------
--  DDL for Table TB_CM_INCENTIVE_ADHOC_DETAIL
--------------------------------------------------------

  CREATE TABLE "TB_CM_INCENTIVE_ADHOC_DETAIL" 
   (	"SCHEME_ID" VARCHAR2(12 BYTE), 
	"BILLTO_CODE" VARCHAR2(20 BYTE), 
	"MODEL" VARCHAR2(30 BYTE), 
	"UNIT" VARCHAR2(2 BYTE) DEFAULT 1, 
	"POINT" VARCHAR2(12 BYTE), 
	"AMT" VARCHAR2(12 BYTE), 
	"CREATE_DATE" DATE DEFAULT sysdate, 
	"CREATE_USER" VARCHAR2(10 BYTE), 
	"REGION" VARCHAR2(2 BYTE) DEFAULT 00
   ) ;
--------------------------------------------------------
--  DDL for Table TB_CM_INCENTIVE_BALANCE
--------------------------------------------------------

  CREATE TABLE "TB_CM_INCENTIVE_BALANCE" 
   (	"YYYYMM" VARCHAR2(6 BYTE), 
	"SCHEME_ID" VARCHAR2(12 BYTE), 
	"SHOP_CODE" VARCHAR2(8 BYTE), 
	"MODEL" VARCHAR2(20 BYTE), 
	"POINT" VARCHAR2(10 BYTE) DEFAULT 0, 
	"AMT" VARCHAR2(10 BYTE) DEFAULT 0, 
	"CLOSED_FLAG" VARCHAR2(1 BYTE) DEFAULT 'N', 
	"CREATE_DATE" DATE DEFAULT sysdate, 
	"UPDATE_DATE" DATE DEFAULT sysdate, 
	"REGION_ID" VARCHAR2(2 BYTE), 
	"CLOSED_USER" VARCHAR2(10 BYTE), 
	"CLOSED_DATE" DATE, 
	"QTY" VARCHAR2(5 BYTE) DEFAULT 0, 
	"BILLTO_CODE" VARCHAR2(50 BYTE), 
	"BILLTO_NAME" VARCHAR2(500 BYTE)
   ) ;
--------------------------------------------------------
--  DDL for Table TB_CM_INCENTIVE_CLOSE_MST
--------------------------------------------------------

  CREATE TABLE "TB_CM_INCENTIVE_CLOSE_MST" 
   (	"CLOSE_PERIOD" VARCHAR2(6 BYTE), 
	"START_DATE" VARCHAR2(8 BYTE), 
	"END_DATE" VARCHAR2(8 BYTE), 
	"CREATE_DATE" DATE DEFAULT sysdate, 
	"CLOSE_FLAG" VARCHAR2(1 BYTE) DEFAULT 'N', 
	"CREATE_USER" VARCHAR2(8 BYTE), 
	"CLOSE_USER" VARCHAR2(8 BYTE), 
	"CLOSE_DATE" DATE, 
	"SCHEME_ID" VARCHAR2(12 BYTE), 
	"PURPOSE" VARCHAR2(200 BYTE)
   ) ;
--------------------------------------------------------
--  DDL for Table TB_CM_INCENTIVE_DETAIL
--------------------------------------------------------

  CREATE TABLE "TB_CM_INCENTIVE_DETAIL" 
   (	"SCHEME_ID" VARCHAR2(12 BYTE), 
	"MODEL" VARCHAR2(30 BYTE), 
	"UNIT" VARCHAR2(2 BYTE) DEFAULT 1, 
	"POINT" VARCHAR2(12 BYTE), 
	"AMT" VARCHAR2(12 BYTE), 
	"CREATE_DATE" DATE DEFAULT sysdate, 
	"CREATE_USER" VARCHAR2(10 BYTE), 
	"REGION" VARCHAR2(2 BYTE) DEFAULT 00, 
	"UPDATE_DATE" DATE
   ) ;
--------------------------------------------------------
--  DDL for Table TB_CM_INCENTIVE_MST
--------------------------------------------------------

  CREATE TABLE "TB_CM_INCENTIVE_MST" 
   (	"SCHEME_ID" VARCHAR2(12 BYTE), 
	"SCHEME_NAME" VARCHAR2(100 BYTE), 
	"START_DATE" DATE, 
	"END_DATE" DATE, 
	"PURPOSE" VARCHAR2(1000 BYTE), 
	"CREATE_DATE" DATE DEFAULT sysdate, 
	"CREATE_USER" VARCHAR2(10 BYTE), 
	"UPDATE_DATE" DATE DEFAULT sysdate, 
	"REGION" VARCHAR2(2 BYTE) DEFAULT 00, 
	"CLOSE_FLAG" VARCHAR2(2 BYTE) DEFAULT 'N', 
	"CLOSE_USER" VARCHAR2(10 BYTE), 
	"CLOSE_DATE" DATE, 
	"MDI" VARCHAR2(1 BYTE) DEFAULT 'T'
   ) ;
--------------------------------------------------------
--  DDL for Table TB_CM_MODEL_CAT
--------------------------------------------------------

  CREATE TABLE "TB_CM_MODEL_CAT" 
   (	"PROD_L1" VARCHAR2(5 BYTE), 
	"MODEL" VARCHAR2(25 BYTE), 
	"CREATE_DATE" DATE DEFAULT sysdate, 
	"SUFFIX" VARCHAR2(20 BYTE), 
	"MP_MODEL" VARCHAR2(25 BYTE), 
	"MP_SUFFIX" VARCHAR2(20 BYTE), 
	"ACTIVE_CODE" VARCHAR2(1 BYTE), 
	"SALE_FLAG" VARCHAR2(1 BYTE), 
	"PROD_L2" VARCHAR2(4 BYTE), 
	"PROD_L3" VARCHAR2(8 BYTE), 
	"PROD_L4" VARCHAR2(10 BYTE), 
	"TENTATIVE_FLAG" VARCHAR2(1 BYTE), 
	"MODEL_SPEC" VARCHAR2(200 BYTE), 
	"PUR_TYPE" VARCHAR2(1 BYTE), 
	"ENABLE_FLAG" VARCHAR2(1 BYTE), 
	"LAST_UPDATE_DATE" DATE, 
	"UNIT" VARCHAR2(1 BYTE), 
	"AU_CODE" VARCHAR2(10 BYTE), 
	"AF_CODE" VARCHAR2(4 BYTE), 
	"EOM" VARCHAR2(2 BYTE), 
	"PROD_TYPE" VARCHAR2(5 BYTE), 
	"MKT" VARCHAR2(1 BYTE), 
	"IF_DATE" DATE DEFAULT sysdate, 
	"SO_TRANSFER_FLAG" VARCHAR2(1 BYTE) DEFAULT 'N', 
	"SO_TRANSFER_DATE" DATE
   ) ;
--------------------------------------------------------
--  DDL for Table TB_CM_MRP
--------------------------------------------------------

  CREATE TABLE "TB_CM_MRP" 
   (	"MODEL" VARCHAR2(50 BYTE), 
	"MRP" VARCHAR2(15 BYTE), 
	"CREATE_DATE" DATE DEFAULT sysdate, 
	"SO_TRANSFER_FLAG" VARCHAR2(1 BYTE) DEFAULT 'N', 
	"SO_TRANSFER_DATE" DATE
   ) ;
--------------------------------------------------------
--  DDL for Table TB_CM_ORGANIZATION
--------------------------------------------------------

  CREATE TABLE "TB_CM_ORGANIZATION" 
   (	"ORG_CODE" VARCHAR2(3 BYTE), 
	"ORG_NAME" VARCHAR2(50 BYTE), 
	"DESCRIPTION" VARCHAR2(100 BYTE)
   ) ;
--------------------------------------------------------
--  DDL for Table TB_CM_PROVINCE
--------------------------------------------------------

  CREATE TABLE "TB_CM_PROVINCE" 
   (	"ID" NUMBER(10,0), 
	"REGION_ID" VARCHAR2(2 BYTE), 
	"NAME" VARCHAR2(50 BYTE), 
	"LNG" FLOAT(126), 
	"LAT" FLOAT(126), 
	"ENTRY_USER_ID" NUMBER(10,0), 
	"ENTRY_USER_NAME" VARCHAR2(50 BYTE), 
	"ENTRY_DATE_TIME" DATE, 
	"UPDATE_USER_ID" NUMBER(10,0), 
	"UPDATE_USER_NAME" VARCHAR2(50 BYTE), 
	"UPDATE_DATE_TIME" DATE, 
	"SO_TRANSFER_FLAG" VARCHAR2(1 BYTE) DEFAULT 'N', 
	"SO_TRANSFER_DATE" DATE
   ) ;
--------------------------------------------------------
--  DDL for Table TB_CM_REGION
--------------------------------------------------------

  CREATE TABLE "TB_CM_REGION" 
   (	"ID" VARCHAR2(2 BYTE), 
	"NAME" VARCHAR2(50 BYTE), 
	"SO_TRANSFER_FLAG" VARCHAR2(1 BYTE) DEFAULT 'N', 
	"SO_TRANSFER_DATE" DATE
   ) ;
--------------------------------------------------------
--  DDL for Table TB_CM_SHIPTO_INF
--------------------------------------------------------

  CREATE TABLE "TB_CM_SHIPTO_INF" 
   (	"BILLTO_CODE" VARCHAR2(30 BYTE), 
	"BILLTO_NAME" VARCHAR2(150 BYTE), 
	"BILLTO_FULLNAME" VARCHAR2(200 BYTE), 
	"BILLTO_ADDRESS1" VARCHAR2(500 BYTE), 
	"SHIPTO_CODE" VARCHAR2(50 BYTE), 
	"SHIPTO_NAME" VARCHAR2(150 BYTE), 
	"SHIPTO_FULLNAME" VARCHAR2(200 BYTE), 
	"ADDRESS1" VARCHAR2(500 BYTE), 
	"ADDRESS2" VARCHAR2(500 BYTE), 
	"ADDRESS3" VARCHAR2(500 BYTE), 
	"ADDRESS4" VARCHAR2(500 BYTE), 
	"POSTAL_CODE" VARCHAR2(10 BYTE), 
	"COUNTRY" VARCHAR2(2 BYTE), 
	"CITY" VARCHAR2(50 BYTE), 
	"BIZ_REG" VARCHAR2(30 BYTE), 
	"SHIPTO_STATUS" VARCHAR2(1 BYTE), 
	"MARKET_TYPE" VARCHAR2(3 BYTE), 
	"SALES_CHANNEL" VARCHAR2(20 BYTE), 
	"ACTIVE_FLAG" VARCHAR2(1 BYTE), 
	"SO_TRANSFER_FLAG" VARCHAR2(1 BYTE) DEFAULT 'N', 
	"SO_TRANSFER_DATA" DATE
   ) ;
--------------------------------------------------------
--  DDL for Table TB_CM_SHOP_BILLTO
--------------------------------------------------------

  CREATE TABLE "TB_CM_SHOP_BILLTO" 
   (	"BILLTO_CODE" VARCHAR2(50 BYTE), 
	"SHOP_CODE" VARCHAR2(10 BYTE), 
	"CREATE_DATE" DATE DEFAULT sysdate, 
	"MODIFY_DATE" DATE DEFAULT sysdate, 
	"CREATE_USER" VARCHAR2(10 BYTE), 
	"MODIFY_USER" VARCHAR2(10 BYTE), 
	"USE_FLAG" VARCHAR2(1 BYTE) DEFAULT 'Y', 
	"SO_TRANSFER_FLAG" VARCHAR2(1 BYTE) DEFAULT 'N', 
	"SO_TRANSFER_DATE" DATE
   ) ;
--------------------------------------------------------
--  DDL for Table TB_CM_SHOP_CELL
--------------------------------------------------------

  CREATE TABLE "TB_CM_SHOP_CELL" 
   (	"SHOP_ID" VARCHAR2(10 BYTE), 
	"SHOP_CELL" VARCHAR2(20 BYTE), 
	"CREATE_DATE" DATE DEFAULT sysdate, 
	"MODIFY_DATE" DATE DEFAULT sysdate, 
	"CREATE_USER" VARCHAR2(10 BYTE), 
	"USE_FLAG" VARCHAR2(1 BYTE) DEFAULT 'Y', 
	"MODIFY_USER" VARCHAR2(10 BYTE), 
	"SO_TRANSFER_FLAG" VARCHAR2(1 BYTE) DEFAULT 'N', 
	"SO_TRANSFER_DATE" DATE
   ) ;
--------------------------------------------------------
--  DDL for Table TB_CM_SHOP_INF
--------------------------------------------------------

  CREATE TABLE "TB_CM_SHOP_INF" 
   (	"BILLTO_CODE" VARCHAR2(50 BYTE), 
	"SHOP_CODE" VARCHAR2(8 BYTE), 
	"SHOP_NAME" VARCHAR2(100 BYTE), 
	"ADDRESS" VARCHAR2(500 BYTE), 
	"CELL_NO#1" VARCHAR2(20 BYTE), 
	"DIST_CODE" VARCHAR2(5 BYTE), 
	"PROVINCE_CODE" VARCHAR2(5 BYTE), 
	"CREATE_DATE" DATE DEFAULT sysdate, 
	"UPDATE_DATE" DATE DEFAULT sysdate, 
	"ISDN_NO" VARCHAR2(20 BYTE), 
	"CUSTOMER_CODE" VARCHAR2(50 BYTE), 
	"AREA_CODE" VARCHAR2(2 BYTE), 
	"CELL_NO#2" VARCHAR2(20 BYTE), 
	"OWNER_NAME" VARCHAR2(100 BYTE), 
	"OWNER_EMAIL" VARCHAR2(100 BYTE), 
	"USE_FLAG" VARCHAR2(1 BYTE) DEFAULT 'Y', 
	"CHANNEL" VARCHAR2(1 BYTE) DEFAULT 'N', 
	"REG_ID" VARCHAR2(2 BYTE), 
	"CREATE_USER" VARCHAR2(10 BYTE), 
	"UPDATE_USER" VARCHAR2(10 BYTE), 
	"SHOP_TYPE" VARCHAR2(10 BYTE) DEFAULT 'SUB-D', 
	"SO_TRANSFER_FLAG" VARCHAR2(1 BYTE) DEFAULT 'N', 
	"SO_TRANSFER_DATE" DATE
   ) ;
--------------------------------------------------------
--  DDL for Table TB_CM_SN_INF_DEC
--------------------------------------------------------

  CREATE TABLE "TB_CM_SN_INF_DEC" 
   (	"SN_LEN" VARCHAR2(2 BYTE), 
	"SN_LEFT" VARCHAR2(2 BYTE), 
	"SN_RIGHT" VARCHAR2(2 BYTE), 
	"CREATE_DATE" DATE DEFAULT sysdate, 
	"UPDATE_DATE" DATE DEFAULT sysdate, 
	"USER_ID" VARCHAR2(16 BYTE) DEFAULT 'PROC', 
	"SUB_CODE" VARCHAR2(50 BYTE), 
	"MES_PROD" VARCHAR2(20 BYTE), 
	"SET_BOX" VARCHAR2(1 BYTE), 
	"SO_TRANSFER_FLAG" VARCHAR2(1 BYTE) DEFAULT 'N', 
	"SO_TRANSFER_DATE" DATE
   ) ;
--------------------------------------------------------
--  DDL for Table TB_CM_SUB_INF
--------------------------------------------------------

  CREATE TABLE "TB_CM_SUB_INF" 
   (	"SUB_CODE" VARCHAR2(15 BYTE), 
	"SUB_NAME" VARCHAR2(100 BYTE), 
	"PROD_CAT" VARCHAR2(500 BYTE), 
	"PROD_ML" VARCHAR2(500 BYTE), 
	"CREATE_DATE" DATE DEFAULT sysdate
   ) ;
--------------------------------------------------------
--  DDL for Table TB_CM_SYS_LOG
--------------------------------------------------------

  CREATE TABLE "TB_CM_SYS_LOG" 
   (	"ID" VARCHAR2(20 BYTE), 
	"ENTRY_USER_ID" VARCHAR2(9 BYTE), 
	"TITLE" VARCHAR2(100 BYTE), 
	"SEQ_KEY" VARCHAR2(100 BYTE), 
	"ACTION1" VARCHAR2(800 BYTE), 
	"ACTION2" VARCHAR2(800 BYTE), 
	"ACTION3" VARCHAR2(800 BYTE), 
	"ACTION4" VARCHAR2(800 BYTE), 
	"ACTION5" VARCHAR2(800 BYTE), 
	"ACTION6" VARCHAR2(500 BYTE), 
	"ACTION7" VARCHAR2(500 BYTE), 
	"ACTION8" VARCHAR2(500 BYTE), 
	"ACTION9" VARCHAR2(500 BYTE), 
	"ACTION10" VARCHAR2(500 BYTE), 
	"ACTION11" VARCHAR2(500 BYTE), 
	"ACTION12" VARCHAR2(500 BYTE), 
	"ACTION13" VARCHAR2(500 BYTE), 
	"ACTION14" VARCHAR2(500 BYTE), 
	"ACTION15" VARCHAR2(500 BYTE), 
	"ACTION16" VARCHAR2(500 BYTE), 
	"ACTION17" VARCHAR2(500 BYTE), 
	"ACTION18" VARCHAR2(500 BYTE), 
	"ACTION19" VARCHAR2(500 BYTE), 
	"ACTION20" VARCHAR2(500 BYTE), 
	"ENTRY_DATE_TIME" DATE, 
	"REMARK" VARCHAR2(800 BYTE)
   ) ;
--------------------------------------------------------
--  DDL for Table TB_DELIVERY_RDC_HIST
--------------------------------------------------------

  CREATE TABLE "TB_DELIVERY_RDC_HIST" 
   (	"INV_ORG" VARCHAR2(5 BYTE), 
	"DELIVERY_NO" VARCHAR2(30 BYTE), 
	"PLAN_NO" VARCHAR2(50 BYTE), 
	"PICK_NO" VARCHAR2(25 BYTE), 
	"SHIPTO_CODE" VARCHAR2(30 BYTE), 
	"SHIPTO_NAME" VARCHAR2(1000 BYTE), 
	"MODEL_SUFFIX" VARCHAR2(30 BYTE), 
	"DELIVERY_ADDRESS" NVARCHAR2(1000), 
	"DELIVERY_QTY" VARCHAR2(5 BYTE), 
	"DELIVERY_DATE" DATE, 
	"UNIQUE_ID" TIMESTAMP (6) DEFAULT current_timestamp, 
	"LINE_ID" VARCHAR2(3 BYTE), 
	"DELIVERY_STATUS" VARCHAR2(10 BYTE), 
	"CREATE_DATE" DATE DEFAULT sysdate, 
	"SHIP_DATE" DATE, 
	"PICK_DATE" DATE, 
	"MODEL" VARCHAR2(20 BYTE), 
	"SUFFIX" VARCHAR2(20 BYTE)
   ) ;
--------------------------------------------------------
--  DDL for Table TB_EDI_HIST
--------------------------------------------------------

  CREATE TABLE "TB_EDI_HIST" 
   (	"UNIQUE_ID" TIMESTAMP (6) DEFAULT current_timestamp, 
	"EDI_FILENAME" VARCHAR2(100 BYTE), 
	"EDI_USERNAME" VARCHAR2(50 BYTE), 
	"EDI_MACHINENAME" VARCHAR2(50 BYTE), 
	"ORG_SIDE" VARCHAR2(3 BYTE), 
	"ROW_NUMBER" VARCHAR2(8 BYTE), 
	"END_TIME" DATE, 
	"START_TIME" DATE, 
	"EDI_DATE" DATE DEFAULT sysdate, 
	"EDI_MACADDRESS" VARCHAR2(50 BYTE), 
	"EDI_FILESIZE" VARCHAR2(10 BYTE) DEFAULT '0', 
	"EDI_SHEETNAME" VARCHAR2(50 BYTE), 
	"EDI_STATUS" VARCHAR2(1 BYTE) DEFAULT 'N', 
	"ORG_CODE" VARCHAR2(3 BYTE), 
	"ITEM_ID" VARCHAR2(2 BYTE), 
	"EDI_IPADDRESS" VARCHAR2(30 BYTE), 
	"SUCCESS_CNT" VARCHAR2(10 BYTE) DEFAULT '0', 
	"DUP_CNT" VARCHAR2(10 BYTE) DEFAULT '0', 
	"DUP_ITEM" CLOB
   ) ;

   COMMENT ON COLUMN "TB_EDI_HIST"."ITEM_ID" IS 'EDI ITEM ID';
--------------------------------------------------------
--  DDL for Table TB_EDI_ITEM
--------------------------------------------------------

  CREATE TABLE "TB_EDI_ITEM" 
   (	"ITEM_ID" VARCHAR2(2 BYTE), 
	"ORG_SIDE" VARCHAR2(3 BYTE), 
	"ITEM_NAME" VARCHAR2(40 BYTE), 
	"CREATE_DATE" DATE DEFAULT sysdate
   ) ;
--------------------------------------------------------
--  DDL for Table TB_EDI_RESULT
--------------------------------------------------------

  CREATE TABLE "TB_EDI_RESULT" 
   (	"DUP_CNT" VARCHAR2(10 BYTE), 
	"DONE_CNT" VARCHAR2(10 BYTE), 
	"DUP_ITEM" CLOB, 
	"EDI_FILE" VARCHAR2(50 BYTE), 
	"FAIL_CNT" VARCHAR2(10 BYTE), 
	"FAIL_ITEM" CLOB, 
	"EDI_DATE" VARCHAR2(8 BYTE), 
	"EDI_TIME" DATE, 
	"EDI_HEAD" VARCHAR2(10 BYTE), 
	"EDI_CODE" VARCHAR2(10 BYTE), 
	"NEW_CNT" VARCHAR2(10 BYTE), 
	"DONE_ITEM" CLOB, 
	"RESPONSE" VARCHAR2(1 BYTE) DEFAULT 'N'
   ) ;
--------------------------------------------------------
--  DDL for Table TB_FTP_MC
--------------------------------------------------------

  CREATE TABLE "TB_FTP_MC" 
   (	"MC_NAME" VARCHAR2(20 BYTE), 
	"BILLTO_CODE" VARCHAR2(50 BYTE), 
	"ID" VARCHAR2(50 BYTE), 
	"PWD" VARCHAR2(50 BYTE), 
	"CREATE_DATE" DATE DEFAULT sysdate, 
	"SEND_FOLDER" VARCHAR2(50 BYTE), 
	"RECEIVE_FLODER" VARCHAR2(50 BYTE)
   ) ;
--------------------------------------------------------
--  DDL for Table TB_LEVEL
--------------------------------------------------------

  CREATE TABLE "TB_LEVEL" 
   (	"ID" NUMBER(10,0), 
	"CODE" VARCHAR2(100 BYTE), 
	"NAME" VARCHAR2(100 BYTE), 
	"REMARK" VARCHAR2(100 BYTE), 
	"ENTRY_USER_ID" NUMBER(10,0), 
	"ENTRY_USER_NAME" VARCHAR2(100 BYTE), 
	"ENTRY_DATE_TIME" DATE, 
	"UPDATE_USER_ID" NUMBER(10,0), 
	"UPDATE_USER_NAME" VARCHAR2(100 BYTE), 
	"UPDATE_DATE_TIME" DATE
   ) ;
--------------------------------------------------------
--  DDL for Table TB_LEVEL_MENU
--------------------------------------------------------

  CREATE TABLE "TB_LEVEL_MENU" 
   (	"ID" NUMBER(10,0), 
	"LEVEL_ID" NUMBER(10,0), 
	"MENU_ID" NUMBER(10,0), 
	"ENTRY_USER_ID" NUMBER(10,0), 
	"ENTRY_USER_NAME" VARCHAR2(100 BYTE), 
	"ENTRY_DATE_TIME" DATE, 
	"UPDATE_USER_ID" NUMBER(10,0), 
	"UPDATE_USER_NAME" VARCHAR2(100 BYTE), 
	"UPDATE_DATE_TIME" DATE
   ) ;
--------------------------------------------------------
--  DDL for Table TB_MENU
--------------------------------------------------------

  CREATE TABLE "TB_MENU" 
   (	"ID" NUMBER(10,0), 
	"CODE" VARCHAR2(100 BYTE), 
	"NAME" VARCHAR2(100 BYTE), 
	"ACTIVE" NUMBER(1,0), 
	"ENTRY_USER_ID" NUMBER(10,0), 
	"ENTRY_USER_NAME" VARCHAR2(100 BYTE), 
	"ENTRY_DATE_TIME" DATE, 
	"UPDATE_USER_ID" NUMBER(10,0), 
	"UPDATE_USER_NAME" VARCHAR2(100 BYTE), 
	"UPDATE_DATE_TIME" DATE, 
	"DISPLAY_ORDER" NUMBER(10,0), 
	"OPEN_TYPE" NVARCHAR2(20)
   ) ;
--------------------------------------------------------
--  DDL for Table TB_MO_HIST
--------------------------------------------------------

  CREATE TABLE "TB_MO_HIST" 
   (	"CELL_NO" VARCHAR2(15 BYTE), 
	"SHORTCODE" VARCHAR2(15 BYTE) DEFAULT '8069', 
	"MOSEQ" VARCHAR2(20 BYTE), 
	"CMDCODE" VARCHAR2(160 BYTE), 
	"MSGBODY" VARCHAR2(160 BYTE), 
	"RECEIVE_TIME" DATE, 
	"FILENAME" VARCHAR2(300 BYTE), 
	"FILEDATE" VARCHAR2(20 BYTE) DEFAULT null, 
	"SO_TRANSFER_FLAG" VARCHAR2(1 BYTE) DEFAULT 'N', 
	"SO_TRANSFER_DATE" DATE DEFAULT null, 
	"TRANSFER_FLAG" VARCHAR2(1 BYTE) DEFAULT 'N', 
	"TRANSFER_DATE" DATE, 
	"MO_SEQ" NUMBER
   ) ;

   COMMENT ON COLUMN "TB_MO_HIST"."CELL_NO" IS 'Send mobile number';
   COMMENT ON COLUMN "TB_MO_HIST"."SHORTCODE" IS '8xxx, 1900xxxx (short code)';
   COMMENT ON COLUMN "TB_MO_HIST"."MOSEQ" IS 'MO message sequence number for MT-mapping
purposes (generated by GAPIT)';
   COMMENT ON COLUMN "TB_MO_HIST"."CMDCODE" IS 'MO command code';
   COMMENT ON COLUMN "TB_MO_HIST"."MSGBODY" IS 'The original SMS text message';
   COMMENT ON COLUMN "TB_MO_HIST"."RECEIVE_TIME" IS 'Send time';
   COMMENT ON COLUMN "TB_MO_HIST"."FILENAME" IS 'XML MO FILE sent by Gabit';
   COMMENT ON COLUMN "TB_MO_HIST"."SO_TRANSFER_FLAG" IS 'Transfer date from MO to MT';
   COMMENT ON COLUMN "TB_MO_HIST"."SO_TRANSFER_DATE" IS 'Transfer flag from MO to MT';
--------------------------------------------------------
--  DDL for Table TB_MT_HIST
--------------------------------------------------------

  CREATE TABLE "TB_MT_HIST" 
   (	"MOSEQ" VARCHAR2(20 BYTE), 
	"SHORTCODE" VARCHAR2(10 BYTE) DEFAULT 'LG-CSKH', 
	"CELL_NO" VARCHAR2(15 BYTE), 
	"MSGBODY" VARCHAR2(200 BYTE), 
	"MSGTYPE" VARCHAR2(10 BYTE) DEFAULT 'TEXT', 
	"MTTOTALSEQ" VARCHAR2(1 BYTE) DEFAULT '1', 
	"MTSEQREF" VARCHAR2(1 BYTE) DEFAULT '1', 
	"SEND_TIME" VARCHAR2(20 BYTE), 
	"FINISH_TIME" VARCHAR2(20 BYTE), 
	"SEND_FLAG" VARCHAR2(1 BYTE) DEFAULT 'N', 
	"RESULT" VARCHAR2(4 BYTE), 
	"LAST_UPDATE_DATE" DATE DEFAULT sysdate, 
	"CPID" VARCHAR2(5 BYTE) DEFAULT '10312', 
	"CMDCODE" VARCHAR2(160 BYTE), 
	"MO_MSGBODY" VARCHAR2(160 BYTE), 
	"RESP_TYPE" VARCHAR2(10 BYTE), 
	"MO_RECEIVE_TIME" DATE, 
	"CREATE_DATE" DATE DEFAULT sysdate, 
	"SO_TRANSFER_FLAG" VARCHAR2(1 BYTE) DEFAULT 'N', 
	"SO_TRANSFER_DATE" DATE, 
	"MT_SEQ" NUMBER
   ) ;

   COMMENT ON COLUMN "TB_MT_HIST"."MOSEQ" IS 'seq of received MO';
   COMMENT ON COLUMN "TB_MT_HIST"."SHORTCODE" IS 'Gabit service number, default LG Brand name ';
   COMMENT ON COLUMN "TB_MT_HIST"."CELL_NO" IS 'mobile number of MO sender';
   COMMENT ON COLUMN "TB_MT_HIST"."MSGBODY" IS 'MSG BODY';
   COMMENT ON COLUMN "TB_MT_HIST"."MSGTYPE" IS 'MSG TYPE';
   COMMENT ON COLUMN "TB_MT_HIST"."MTTOTALSEQ" IS 'total msg would be sent';
   COMMENT ON COLUMN "TB_MT_HIST"."SEND_TIME" IS 'MT sent datetime';
   COMMENT ON COLUMN "TB_MT_HIST"."FINISH_TIME" IS 'MT finished datetime';
   COMMENT ON COLUMN "TB_MT_HIST"."RESULT" IS 'Result code 200 :  success, 403 : wrong cpid, user, pass, 400: others error';
   COMMENT ON COLUMN "TB_MT_HIST"."LAST_UPDATE_DATE" IS 'MT last update date';
   COMMENT ON COLUMN "TB_MT_HIST"."CMDCODE" IS 'command code LGDK or LGBH';
   COMMENT ON COLUMN "TB_MT_HIST"."RESP_TYPE" IS 'MT response type';
   COMMENT ON COLUMN "TB_MT_HIST"."CREATE_DATE" IS 'MT create date';
--------------------------------------------------------
--  DDL for Table TB_MT_SEND
--------------------------------------------------------

  CREATE TABLE "TB_MT_SEND" 
   (	"MOSEQ" VARCHAR2(20 BYTE), 
	"SHORTCODE" VARCHAR2(10 BYTE) DEFAULT 'LG-CSKH', 
	"CELL_NO" VARCHAR2(15 BYTE), 
	"MSGBODY" VARCHAR2(200 BYTE), 
	"MSGTYPE" VARCHAR2(10 BYTE) DEFAULT 'TEXT', 
	"MTTOTALSEQ" VARCHAR2(1 BYTE) DEFAULT '1', 
	"MTSEQREF" VARCHAR2(1 BYTE) DEFAULT '1', 
	"CPID" VARCHAR2(5 BYTE) DEFAULT '10312', 
	"MT_SEQ" NUMBER, 
	"SEND_FLAG" VARCHAR2(1 BYTE) DEFAULT 0
   ) ;
--------------------------------------------------------
--  DDL for Table TB_MT_SMS_RESP_MSG
--------------------------------------------------------

  CREATE TABLE "TB_MT_SMS_RESP_MSG" 
   (	"RESP_TYPE" VARCHAR2(10 BYTE), 
	"RESP_MSG#1" VARCHAR2(160 BYTE), 
	"CREATE_DATE" DATE DEFAULT sysdate, 
	"MSGBODY_LEN" VARCHAR2(5 BYTE), 
	"RESP_MSG#2" VARCHAR2(160 BYTE), 
	"GABIT_TEMPLATE" VARCHAR2(160 BYTE), 
	"GABIT_ID" VARCHAR2(5 BYTE), 
	"TEMPLATE" VARCHAR2(160 BYTE), 
	"PURPOSE" VARCHAR2(20 BYTE), 
	"SO_TRANSFER_FLAG" VARCHAR2(1 BYTE) DEFAULT 'N', 
	"SO_TRANSFER_DATE" DATE
   ) ;
--------------------------------------------------------
--  DDL for Table TB_NON_INCENTIVE_CUST
--------------------------------------------------------

  CREATE TABLE "TB_NON_INCENTIVE_CUST" 
   (	"BILLTO_CODE" VARCHAR2(50 BYTE), 
	"BILLTO_NAME" VARCHAR2(200 BYTE), 
	"TYPE" VARCHAR2(3 BYTE), 
	"CHANNEL" VARCHAR2(15 BYTE), 
	"REGION" VARCHAR2(2 BYTE)
   ) ;
--------------------------------------------------------
--  DDL for Table TB_ORDER_SHIP_HIST
--------------------------------------------------------

  CREATE TABLE "TB_ORDER_SHIP_HIST" 
   (	"INV_ORG" VARCHAR2(3 BYTE), 
	"SHIPTO_CODE" VARCHAR2(20 BYTE), 
	"SHIPTO_NAME" VARCHAR2(200 BYTE), 
	"CITY" VARCHAR2(20 BYTE), 
	"ORDER_NO" VARCHAR2(12 BYTE), 
	"LINE_NO" VARCHAR2(10 BYTE), 
	"LINE_STATUS" VARCHAR2(50 BYTE), 
	"PROD_DIV" VARCHAR2(20 BYTE), 
	"MODEL_SUFFIX" VARCHAR2(30 BYTE), 
	"ORDER_QTY" VARCHAR2(5 BYTE), 
	"RELEASE_QTY" VARCHAR2(5 BYTE), 
	"UNIT_SELL_PRICE" VARCHAR2(20 BYTE) DEFAULT '0', 
	"ORDER_AMT" VARCHAR2(20 BYTE) DEFAULT '0', 
	"SHIPPING_METHOD" VARCHAR2(50 BYTE), 
	"REQUEST_SHIPPED_DATE" DATE, 
	"REQUEST_ARRIVAL_DATE" DATE, 
	"SHIPPING_REMARK" VARCHAR2(1000 BYTE), 
	"INVOICE_NO" VARCHAR2(50 BYTE), 
	"INVOICE_DATE" DATE, 
	"BOOKED_DATE" DATE, 
	"PICK_NO" VARCHAR2(30 BYTE), 
	"PICK_RELEASE_DATE" DATE, 
	"DELIVERY_NO" VARCHAR2(40 BYTE), 
	"SUBINVENTORY" VARCHAR2(20 BYTE), 
	"CREATION_DATE" DATE, 
	"BILLTO_CODE" VARCHAR2(30 BYTE), 
	"BILLTO_NAME" VARCHAR2(100 BYTE), 
	"SALESCHANNEL_CODE" VARCHAR2(30 BYTE), 
	"SALESCHANNEL_NAME" VARCHAR2(100 BYTE), 
	"CREATED_BY" VARCHAR2(150 BYTE), 
	"SALESPERSON" VARCHAR2(150 BYTE), 
	"UNIQUE_ID" TIMESTAMP (6) DEFAULT current_timestamp, 
	"PICK_SEQ" VARCHAR2(2 BYTE), 
	"MODEL" VARCHAR2(20 BYTE), 
	"SUFFIX" VARCHAR2(20 BYTE), 
	"AR_FLAG" VARCHAR2(1 BYTE), 
	"AU_CODE" VARCHAR2(3 BYTE), 
	"ACCEPTANCE_CODE" VARCHAR2(3 BYTE), 
	"CARRIER" VARCHAR2(20 BYTE), 
	"ORDER_TYPE_NAME" VARCHAR2(50 BYTE), 
	"CANCEL_FLAG" VARCHAR2(1 BYTE), 
	"SO_TRANSFER_FLAG" VARCHAR2(1 BYTE) DEFAULT 'N', 
	"SO_TRANSFER_DATE" DATE
   ) ;
--------------------------------------------------------
--  DDL for Table TB_SN_CDC_HIST
--------------------------------------------------------

  CREATE TABLE "TB_SN_CDC_HIST" 
   (	"INV_ORG" VARCHAR2(3 BYTE), 
	"LOADPLAN_NO" VARCHAR2(20 BYTE), 
	"SERIAL_NO" VARCHAR2(50 BYTE), 
	"BOX_NO" VARCHAR2(50 BYTE), 
	"SHIPTO_CODE" VARCHAR2(20 BYTE), 
	"SHIPTO_NAME" VARCHAR2(200 BYTE), 
	"SHIPTO_DATE" DATE, 
	"ORDER_NO" VARCHAR2(12 BYTE), 
	"CLOSED_DATE" DATE, 
	"INVOICE_NO" VARCHAR2(20 BYTE), 
	"INVOICE_DATE" DATE, 
	"CUSTOMER_CODE" VARCHAR2(20 BYTE), 
	"CUSTOMER_NAME" VARCHAR2(200 BYTE), 
	"UNIQUE_ID" TIMESTAMP (6) DEFAULT current_timestamp, 
	"SELLOUT_FLAG" VARCHAR2(1 BYTE) DEFAULT 'N', 
	"SELLOUT_DATE" DATE, 
	"INCENTIVE_FLAG" VARCHAR2(1 BYTE) DEFAULT 'N', 
	"WARRANTY_IF_FLAG" VARCHAR2(1 BYTE) DEFAULT 'N', 
	"WARRANTY_IF_DATE" DATE, 
	"SEQ_NO" VARCHAR2(3 BYTE), 
	"MODEL_SUFFIX" VARCHAR2(50 BYTE), 
	"MODEL" VARCHAR2(20 BYTE), 
	"SUFFIX" VARCHAR2(20 BYTE), 
	"SO_TRANSFER_FLAG" VARCHAR2(1 BYTE) DEFAULT 'N', 
	"SO_TRANSFER_DATE" DATE
   ) ;
--------------------------------------------------------
--  DDL for Table TB_SN_INSTALLER
--------------------------------------------------------

  CREATE TABLE "TB_SN_INSTALLER" 
   (	"ISL_CODE" VARCHAR2(10 BYTE), 
	"ISL_CELL" VARCHAR2(20 BYTE), 
	"SERIAL_NO" VARCHAR2(20 BYTE), 
	"MODEL" VARCHAR2(50 BYTE), 
	"SELLIN_DATE" DATE, 
	"SELLOUT_DATE" DATE, 
	"ISL_DATE" DATE, 
	"INC_CFM_FLAG" VARCHAR2(1 BYTE) DEFAULT 'N', 
	"ICN_CFM_USER" VARCHAR2(10 BYTE), 
	"RESP_MSG" VARCHAR2(200 BYTE), 
	"RESP_TYPE" VARCHAR2(10 BYTE), 
	"SUFFIX" VARCHAR2(20 BYTE), 
	"CMDCODE" VARCHAR2(10 BYTE), 
	"MOSEQ" VARCHAR2(20 BYTE), 
	"EU_CELL" VARCHAR2(20 BYTE)
   ) ;
--------------------------------------------------------
--  DDL for Table TB_SN_PND_HIST
--------------------------------------------------------

  CREATE TABLE "TB_SN_PND_HIST" 
   (	"SERIAL_NO" VARCHAR2(50 BYTE), 
	"MOSEQ" VARCHAR2(20 BYTE), 
	"RESP_TYPE" VARCHAR2(10 BYTE), 
	"CMDCODE" VARCHAR2(4 BYTE), 
	"RECEIVE_DATE" DATE, 
	"PND_DAYS" NUMBER(3,0), 
	"CFM_FLAG" VARCHAR2(1 BYTE) DEFAULT 'N', 
	"CFM_TYPE" VARCHAR2(10 BYTE), 
	"CFM_DATE" DATE, 
	"SHOP_CELL" VARCHAR2(20 BYTE), 
	"RESP_MSG" VARCHAR2(200 BYTE), 
	"MODEL" VARCHAR2(50 BYTE), 
	"CFM_USER" VARCHAR2(10 BYTE), 
	"MO_MSGBODY" VARCHAR2(160 BYTE), 
	"END_USER_CELL" VARCHAR2(20 BYTE), 
	"PND_TYPE" VARCHAR2(10 BYTE), 
	"SHOP_CODE" VARCHAR2(10 BYTE), 
	"SMS_YN" VARCHAR2(1 BYTE) DEFAULT 'Y', 
	"REJECT_FLAG" VARCHAR2(1 BYTE) DEFAULT 'N', 
	"REJECT_DATE" DATE, 
	"REJECT_USER" VARCHAR2(10 BYTE), 
	"SO_TRANSFER_FLAG" VARCHAR2(1 BYTE) DEFAULT 'N', 
	"SO_TRANSFER_DATE" DATE
   ) ;
--------------------------------------------------------
--  DDL for Table TB_SN_RDC_HIST
--------------------------------------------------------

  CREATE TABLE "TB_SN_RDC_HIST" 
   (	"INV_ORG" VARCHAR2(5 BYTE), 
	"EDI_NO" VARCHAR2(16 BYTE), 
	"SERIAL_NO" VARCHAR2(100 BYTE), 
	"BOX_NO" VARCHAR2(100 BYTE), 
	"MODEL_SUFFIX" VARCHAR2(20 BYTE), 
	"MODEL" VARCHAR2(20 BYTE), 
	"SUFFIX" VARCHAR2(20 BYTE), 
	"SHIP_NO" VARCHAR2(18 BYTE), 
	"LINE_NO" VARCHAR2(3 BYTE), 
	"OUT_DATE" DATE, 
	"CREATE_DATE" DATE DEFAULT sysdate, 
	"SELLOUT_DATE" DATE, 
	"INCENTIVE_DATE" DATE, 
	"WT_IF_DATE" DATE, 
	"WT_IF_FLAG" VARCHAR2(1 BYTE) DEFAULT 'N', 
	"SELLOUT_STATUS" VARCHAR2(1 BYTE) DEFAULT 'N', 
	"INCENTIVE_FLAG" VARCHAR2(1 BYTE) DEFAULT 'N', 
	"SMS_YN" VARCHAR2(1 BYTE) DEFAULT 'Y', 
	"SO_TRANSFER_FLAG" VARCHAR2(1 BYTE) DEFAULT 'N', 
	"SO_TRANSFER_DATE" DATE
   ) ;
--------------------------------------------------------
--  DDL for Table TB_SN_SO_DEALERS
--------------------------------------------------------

  CREATE TABLE "TB_SN_SO_DEALERS" 
   (	"SHOP_CODE" VARCHAR2(8 BYTE), 
	"SERIAL_NO" VARCHAR2(50 BYTE), 
	"BOX_NO" VARCHAR2(100 BYTE), 
	"MODEL" VARCHAR2(100 BYTE), 
	"MODEL_DESC" VARCHAR2(200 BYTE), 
	"EDI_NO" VARCHAR2(30 BYTE), 
	"SELLOUT_DATE" DATE, 
	"EU_CELL" VARCHAR2(20 BYTE), 
	"EU_NAME" VARCHAR2(100 BYTE), 
	"EU_ADDRESS" VARCHAR2(500 BYTE), 
	"UPDATE_DATE" DATE DEFAULT sysdate, 
	"UPLOAD_USER" VARCHAR2(8 BYTE), 
	"VRF_FLAG" VARCHAR2(1 BYTE) DEFAULT 'N', 
	"SUFFIX" VARCHAR2(20 BYTE), 
	"CFM_FLAG" VARCHAR2(1 BYTE) DEFAULT 'N', 
	"CFM_USER" VARCHAR2(8 BYTE), 
	"CFM_DATE" DATE, 
	"CFM_COMMENT" VARCHAR2(500 BYTE), 
	"SELLIN_DATE" DATE, 
	"EDI_DATE" VARCHAR2(8 BYTE), 
	"EDI_FILE" VARCHAR2(50 BYTE)
   ) ;
--------------------------------------------------------
--  DDL for Table TB_SN_SO_WT_HIST
--------------------------------------------------------

  CREATE TABLE "TB_SN_SO_WT_HIST" 
   (	"SERIAL_NO" VARCHAR2(50 BYTE), 
	"MODEL" VARCHAR2(50 BYTE), 
	"END_USER_CELL" VARCHAR2(20 BYTE), 
	"SHOP_CODE" VARCHAR2(10 BYTE), 
	"SHOP_CELL" VARCHAR2(20 BYTE), 
	"RECEIVE_DATE" DATE, 
	"MOSEQ" VARCHAR2(30 BYTE), 
	"CMDCODE" VARCHAR2(4 BYTE), 
	"RESP_TYPE" VARCHAR2(10 BYTE), 
	"RESP_MSG" VARCHAR2(200 BYTE), 
	"MO_MSGBODY" VARCHAR2(160 BYTE), 
	"SMS_YN" VARCHAR2(1 BYTE) DEFAULT 'Y', 
	"CREATE_DATE" DATE DEFAULT sysdate, 
	"SUCCESS_FLAG" VARCHAR2(1 BYTE) DEFAULT 'N', 
	"EDI_FILE" VARCHAR2(50 BYTE), 
	"EDI_HEAD" VARCHAR2(10 BYTE), 
	"SO_TRANSFER_FLAG" VARCHAR2(1 BYTE) DEFAULT 'N', 
	"SO_TRANSFER_DATE" DATE
   ) ;
--------------------------------------------------------
--  DDL for Table TB_SN_SO_WT_MST
--------------------------------------------------------

  CREATE TABLE "TB_SN_SO_WT_MST" 
   (	"SERIAL_NO" VARCHAR2(20 BYTE), 
	"SELLIN_DATE" DATE, 
	"SELLOUT_DATE" DATE, 
	"WT_START_DATE" DATE, 
	"WT_END_DATE" DATE, 
	"SHOP_CODE" VARCHAR2(10 BYTE), 
	"SHOP_CELL" VARCHAR2(20 BYTE), 
	"SELLOUT_RESP_MSG" VARCHAR2(160 BYTE), 
	"POINT" VARCHAR2(10 BYTE), 
	"AMT" VARCHAR2(10 BYTE), 
	"SELLOUT_RESP_TYPE" VARCHAR2(10 BYTE), 
	"SELLOUT_TIME" VARCHAR2(8 BYTE), 
	"INCENTIVE_CFM_FLAG" VARCHAR2(1 BYTE) DEFAULT 'N', 
	"INCENTIVE_CFM_DATE" DATE, 
	"MODEL" VARCHAR2(50 BYTE), 
	"SUFFIX" VARCHAR2(20 BYTE), 
	"CLOSE_FLAG" VARCHAR2(1 BYTE) DEFAULT 'N', 
	"CLOSE_PERIOD" VARCHAR2(10 BYTE), 
	"SMS_YN" VARCHAR2(1 BYTE) DEFAULT 'Y', 
	"CREATE_DATE" DATE DEFAULT sysdate, 
	"INCENTIVE_CFM_USER" VARCHAR2(10 BYTE) DEFAULT 'SYS', 
	"CLOSE_USER" VARCHAR2(10 BYTE), 
	"INCENTIVE_CFM_PERIOD" VARCHAR2(12 BYTE), 
	"LAST_UPDATE_DATE" DATE DEFAULT sysdate, 
	"END_USER_CELL" VARCHAR2(20 BYTE), 
	"TRANSFER_FLAG" VARCHAR2(1 BYTE) DEFAULT 'N', 
	"TRANSFER_DATE" DATE, 
	"SO_TRANSFER_FLAG" VARCHAR2(1 BYTE) DEFAULT 'N', 
	"SO_TRANSFER_DATE" DATE
   ) ;
--------------------------------------------------------
--  DDL for Table TB_SN_SO_WT_MST0
--------------------------------------------------------

  CREATE TABLE "TB_SN_SO_WT_MST0" 
   (	"MODEL" VARCHAR2(50 BYTE), 
	"SUFFIX" VARCHAR2(20 BYTE), 
	"SERIAL_NO" VARCHAR2(20 BYTE), 
	"WT_START_DATE" DATE, 
	"WT_END_DATE" DATE, 
	"END_USER_CELL" VARCHAR2(20 BYTE), 
	"WT_RESP_MSG" VARCHAR2(160 BYTE), 
	"WT_RESP_TYPE" VARCHAR2(10 BYTE), 
	"SMS_YN" VARCHAR2(1 BYTE) DEFAULT 'Y', 
	"CREATE_DATE" DATE DEFAULT sysdate, 
	"WT_CFM_USER" VARCHAR2(10 BYTE) DEFAULT 'SYS', 
	"LAST_UPDATE_DATE" DATE DEFAULT sysdate, 
	"SELLIN_DATE" DATE, 
	"SELLOUT_DATE" DATE, 
	"SELLOUT_TIME" VARCHAR2(6 BYTE), 
	"TRANSFER_FLAG" VARCHAR2(1 BYTE) DEFAULT 'N', 
	"TRANSFER_DATE" DATE
   ) ;
--------------------------------------------------------
--  DDL for Table TB_SUB_MENU
--------------------------------------------------------

  CREATE TABLE "TB_SUB_MENU" 
   (	"ID" NUMBER(10,0), 
	"PARENT_MENU_ID" NUMBER(10,0), 
	"CODE" VARCHAR2(100 BYTE), 
	"NAME" VARCHAR2(100 BYTE), 
	"ACTIVE" NUMBER(1,0), 
	"ENTRY_USER_ID" NUMBER(10,0), 
	"ENTRY_USER_NAME" VARCHAR2(100 BYTE), 
	"ENTRY_DATE_TIME" DATE, 
	"UPDATE_USER_ID" NUMBER(10,0), 
	"UPDATE_USER_NAME" VARCHAR2(100 BYTE), 
	"UPDATE_DATE_TIME" DATE, 
	"OPEN_TYPE" NVARCHAR2(20)
   ) ;
--------------------------------------------------------
--  DDL for Table TB_USER
--------------------------------------------------------

  CREATE TABLE "TB_USER" 
   (	"ID" NUMBER(10,0), 
	"EMPNO" VARCHAR2(80 BYTE), 
	"ACCOUNT" VARCHAR2(80 BYTE), 
	"PASS" VARCHAR2(400 BYTE), 
	"DISPLAY_NAME" VARCHAR2(80 BYTE), 
	"ACTIVE" NUMBER(1,0), 
	"AVATAR" VARCHAR2(2000 BYTE), 
	"ENTRY_USER_ID" NUMBER(10,0), 
	"ENTRY_USER_NAME" VARCHAR2(100 BYTE), 
	"ENTRY_DATE_TIME" DATE, 
	"UPDATE_USER_ID" NUMBER(10,0), 
	"UPDATE_USER_NAME" VARCHAR2(100 BYTE), 
	"UPDATE_DATE_TIME" DATE, 
	"REGION_ID" VARCHAR2(2 BYTE) DEFAULT '00'
   ) ;
--------------------------------------------------------
--  DDL for Table TB_USER_LEVEL
--------------------------------------------------------

  CREATE TABLE "TB_USER_LEVEL" 
   (	"ID" NUMBER(10,0), 
	"USER_ID" NUMBER(10,0), 
	"LEVEL_ID" NUMBER(10,0), 
	"ENTRY_USER_ID" NUMBER(10,0), 
	"ENTRY_USER_NAME" VARCHAR2(100 BYTE), 
	"ENTRY_DATE_TIME" DATE, 
	"UPDATE_USER_ID" NUMBER(10,0), 
	"UPDATE_USER_NAME" VARCHAR2(100 BYTE), 
	"UPDATE_DATE_TIME" DATE
   ) ;
--------------------------------------------------------
--  DDL for Table TB_USER_MENU
--------------------------------------------------------

  CREATE TABLE "TB_USER_MENU" 
   (	"ID" NUMBER(10,0), 
	"USER_ID" NUMBER(10,0), 
	"MENU_ID" NUMBER(10,0), 
	"ENTRY_USER_ID" NUMBER(10,0), 
	"ENTRY_USER_NAME" VARCHAR2(100 BYTE), 
	"ENTRY_DATE_TIME" DATE, 
	"UPDATE_USER_ID" NUMBER(10,0), 
	"UPDATE_USER_NAME" VARCHAR2(100 BYTE), 
	"UPDATE_DATE_TIME" DATE
   ) ;
--------------------------------------------------------
--  DDL for Table VNXX_DELIVERY_RDC_HIST_IF
--------------------------------------------------------

  CREATE TABLE "VNXX_DELIVERY_RDC_HIST_IF" 
   (	"INV_ORG" VARCHAR2(5 BYTE), 
	"DELIVERY_NO" VARCHAR2(30 BYTE), 
	"PLAN_NO" VARCHAR2(50 BYTE), 
	"PICK_NO" VARCHAR2(25 BYTE), 
	"SHIPTO_CODE" VARCHAR2(25 BYTE), 
	"SHIPTO_NAME" VARCHAR2(1000 BYTE), 
	"MODEL_SUFFIX" VARCHAR2(30 BYTE), 
	"DELIVERY_ADDRESS" NVARCHAR2(1000), 
	"DELIVERY_QTY" VARCHAR2(5 BYTE), 
	"DELIVERY_DATE" DATE, 
	"IF_UNIQUE_ID" TIMESTAMP (6) DEFAULT current_timestamp, 
	"TRANSFER_FLAG" VARCHAR2(1 BYTE) DEFAULT 'N', 
	"TRANSFER_STATUS" VARCHAR2(1 BYTE) DEFAULT 'N', 
	"TRANSFER_DATE" DATE DEFAULT SYSDATE, 
	"LINE_ID" VARCHAR2(3 BYTE), 
	"DELIVERY_STATUS" VARCHAR2(10 BYTE), 
	"SHIP_DATE" DATE, 
	"PICK_DATE" DATE, 
	"MODEL" VARCHAR2(20 BYTE), 
	"SUFFIX" VARCHAR2(20 BYTE)
   ) ;

   COMMENT ON COLUMN "VNXX_DELIVERY_RDC_HIST_IF"."INV_ORG" IS 'WH code';
   COMMENT ON COLUMN "VNXX_DELIVERY_RDC_HIST_IF"."DELIVERY_NO" IS 'Delivery_no';
   COMMENT ON COLUMN "VNXX_DELIVERY_RDC_HIST_IF"."PICK_NO" IS 'EDI_NO GERP';
   COMMENT ON COLUMN "VNXX_DELIVERY_RDC_HIST_IF"."SHIPTO_CODE" IS 'VN''s shipto_code';
   COMMENT ON COLUMN "VNXX_DELIVERY_RDC_HIST_IF"."SHIPTO_NAME" IS 'VN''s shopto_name';
   COMMENT ON COLUMN "VNXX_DELIVERY_RDC_HIST_IF"."MODEL_SUFFIX" IS 'product''s model_suffix';
   COMMENT ON COLUMN "VNXX_DELIVERY_RDC_HIST_IF"."DELIVERY_STATUS" IS 'Delivery status';
--------------------------------------------------------
--  DDL for Table VNXX_EDI_RESULT
--------------------------------------------------------

  CREATE TABLE "VNXX_EDI_RESULT" 
   (	"EDI_DATE" VARCHAR2(8 BYTE), 
	"EDI_TIME" DATE, 
	"EDI_TYPE" VARCHAR2(6 BYTE), 
	"DUP_CNT" VARCHAR2(10 BYTE), 
	"NEW_CNT" VARCHAR2(10 BYTE), 
	"DUP_ITEM" CLOB
   ) ;
--------------------------------------------------------
--  DDL for Table VNXX_ORDER_SHIP_HIST_IF
--------------------------------------------------------

  CREATE TABLE "VNXX_ORDER_SHIP_HIST_IF" 
   (	"INV_ORG" VARCHAR2(3 BYTE), 
	"SHIPTO_CODE" VARCHAR2(20 BYTE), 
	"SHIPTO_NAME" VARCHAR2(200 BYTE), 
	"CITY" VARCHAR2(20 BYTE), 
	"ORDER_NO" VARCHAR2(12 BYTE), 
	"PROD_DIV" VARCHAR2(50 BYTE), 
	"MODEL_SUFFIX" VARCHAR2(30 BYTE), 
	"ORDER_QTY" VARCHAR2(5 BYTE), 
	"RELEASE_QTY" VARCHAR2(5 BYTE) DEFAULT '0', 
	"UNIT_SELL_PRICE" VARCHAR2(20 BYTE) DEFAULT '0', 
	"ORDER_AMT" VARCHAR2(20 BYTE) DEFAULT '0', 
	"SHIPPING_METHOD" VARCHAR2(50 BYTE), 
	"REQUEST_SHIPPED_DATE" DATE, 
	"REQUEST_ARRIVAL_DATE" DATE, 
	"SHIPPING_REMARK" VARCHAR2(1000 BYTE), 
	"INVOICE_NO" VARCHAR2(50 BYTE), 
	"INVOICE_DATE" DATE, 
	"BOOKED_DATE" DATE, 
	"PICK_NO" VARCHAR2(30 BYTE), 
	"PICK_RELEASE_DATE" DATE, 
	"DELIVERY_NO" VARCHAR2(40 BYTE), 
	"SUBINVENTORY" VARCHAR2(20 BYTE), 
	"CREATION_DATE" DATE, 
	"BILLTO_CODE" VARCHAR2(30 BYTE), 
	"BILLTO_NAME" VARCHAR2(100 BYTE), 
	"SALESCHANNEL_CODE" VARCHAR2(30 BYTE), 
	"SALESCHANNEL_NAME" VARCHAR2(100 BYTE), 
	"CREATED_BY" VARCHAR2(150 BYTE), 
	"LINE_STATUS" VARCHAR2(50 BYTE), 
	"SALESPERSON" VARCHAR2(150 BYTE), 
	"UNIQUE_ID" TIMESTAMP (6) DEFAULT current_timestamp, 
	"TRANSFER_DATE" DATE DEFAULT sysdate, 
	"TRANSFER_FLAG" VARCHAR2(1 BYTE) DEFAULT 'N', 
	"TRANSFER_STATUS" VARCHAR2(1 BYTE) DEFAULT 'N', 
	"LINE_NO" VARCHAR2(10 BYTE), 
	"PICK_SEQ" VARCHAR2(2 BYTE), 
	"MODEL" VARCHAR2(20 BYTE), 
	"SUFFIX" VARCHAR2(20 BYTE)
   ) ;
--------------------------------------------------------
--  DDL for Table VNXX_SHPCFM_IF
--------------------------------------------------------

  CREATE TABLE "VNXX_SHPCFM_IF" 
   (	"INTERFACE_ID" NUMBER, 
	"OPERATING_UNIT_ID" NUMBER, 
	"SOURCE_TYPE_CODE" VARCHAR2(30 BYTE), 
	"ORGANIZATION_CODE" VARCHAR2(3 BYTE), 
	"PICK_ORDER_NO" VARCHAR2(30 BYTE), 
	"TRANSACTION_DATE" DATE, 
	"CANCEL_FLAG" VARCHAR2(1 BYTE), 
	"TRANSFER_FLAG" VARCHAR2(1 BYTE), 
	"TRANSFER_DATE" DATE, 
	"GLOBAL_UNIQUE_ID" VARCHAR2(100 BYTE), 
	"BAM_SEQUENCE_ID" NUMBER, 
	"OLD_GLOBAL_UNIQUE_ID" VARCHAR2(100 BYTE), 
	"EDI_SENDER_ID" VARCHAR2(50 BYTE), 
	"EDI_RECEIVER_ID" VARCHAR2(50 BYTE), 
	"EDI_SUB_SENDER_ID" VARCHAR2(50 BYTE), 
	"EDI_SUB_RECEIVER_ID" VARCHAR2(50 BYTE), 
	"EDI_ENVELOPE_NO" VARCHAR2(50 BYTE), 
	"EDI_GROUP_NO" VARCHAR2(50 BYTE), 
	"EDI_TRANSACTION_NO" VARCHAR2(50 BYTE), 
	"STEP_CODE" VARCHAR2(30 BYTE), 
	"STEP_STATUS_CODE" VARCHAR2(30 BYTE), 
	"EDI_INTERFACE_DATE" DATE, 
	"EDI_FUNC_ACKNOWLDG_NO" VARCHAR2(70 BYTE), 
	"EDI_FUNC_ACKNOWLDG_DATE" DATE, 
	"EDI_FUNC_ACKNOWLDG_STATUS_CODE" VARCHAR2(5 BYTE), 
	"EDI_ERROR_CODE" VARCHAR2(20 BYTE), 
	"EDI_ERROR_MESSAGE_TEXT" VARCHAR2(4000 BYTE), 
	"DELIVERY_NO" VARCHAR2(30 BYTE), 
	"LOAD_CONFIRM_NO" VARCHAR2(30 BYTE), 
	"PICK_SEQ_NO" NUMBER, 
	"SOURCE_HEADER_ID" NUMBER, 
	"SOURCE_HEADER_NO" VARCHAR2(30 BYTE), 
	"SHIP_TO_CUSTOMER_CODE" VARCHAR2(11 BYTE), 
	"APPOINTMENT_FROM_DATE" DATE, 
	"APPOINTMENT_TO_DATE" DATE, 
	"SUBINVENTORY_CODE" VARCHAR2(10 BYTE), 
	"CARRIER_CODE" VARCHAR2(9 BYTE), 
	"CUSTOMER_PURCHASE_ORDER_NO" VARCHAR2(30 BYTE), 
	"TRUCK_NO" VARCHAR2(20 BYTE), 
	"SEAL_NO" VARCHAR2(50 BYTE), 
	"DRIVER_NAME" VARCHAR2(40 BYTE), 
	"FREIGHT_AMOUNT" NUMBER(22,2), 
	"SOURCE_LINE_ID" NUMBER, 
	"SOURCE_LINE_NO" NUMBER, 
	"SHIPMENT_NO" NUMBER, 
	"OPTION_NO" NUMBER, 
	"MOVE_ORDER_LINE_ID" NUMBER, 
	"ITEM_CODE" VARCHAR2(40 BYTE), 
	"PICK_QTY" VARCHAR2(9 BYTE), 
	"DELIVERY_QTY" VARCHAR2(9 BYTE), 
	"SHORTAGE_SHIPPING_REASON_CODE" VARCHAR2(3 BYTE), 
	"WMS_ORDER_NO" VARCHAR2(10 BYTE), 
	"WMS_CREATION_USER_NAME" VARCHAR2(50 BYTE), 
	"WMS_CREATION_DATE" DATE, 
	"TRANSPORTATION_WAYBILL_NO" VARCHAR2(50 BYTE), 
	"REMARK1_DESC" VARCHAR2(250 BYTE), 
	"WMS_ORDER_SEQ_NO" VARCHAR2(5 BYTE), 
	"ATTRIBUTE5" VARCHAR2(150 BYTE), 
	"TOTAL_COUNT" NUMBER
   ) ;

   COMMENT ON COLUMN "VNXX_SHPCFM_IF"."INTERFACE_ID" IS 'PK';
   COMMENT ON COLUMN "VNXX_SHPCFM_IF"."OPERATING_UNIT_ID" IS '???????';
   COMMENT ON COLUMN "VNXX_SHPCFM_IF"."SOURCE_TYPE_CODE" IS '??????';
   COMMENT ON COLUMN "VNXX_SHPCFM_IF"."ORGANIZATION_CODE" IS '????';
   COMMENT ON COLUMN "VNXX_SHPCFM_IF"."PICK_ORDER_NO" IS '??????';
   COMMENT ON COLUMN "VNXX_SHPCFM_IF"."TRANSACTION_DATE" IS '????';
   COMMENT ON COLUMN "VNXX_SHPCFM_IF"."TRANSPORTATION_WAYBILL_NO" IS '???????';
   COMMENT ON COLUMN "VNXX_SHPCFM_IF"."REMARK1_DESC" IS '??1??';
   COMMENT ON COLUMN "VNXX_SHPCFM_IF"."WMS_ORDER_SEQ_NO" IS 'WMS???? ????';
   COMMENT ON COLUMN "VNXX_SHPCFM_IF"."ATTRIBUTE5" IS 'Transport Mode Code';
   COMMENT ON COLUMN "VNXX_SHPCFM_IF"."TOTAL_COUNT" IS 'Pick Order No Line ?';
--------------------------------------------------------
--  DDL for Table VNXX_SHPSERIAL_IF
--------------------------------------------------------

  CREATE TABLE "VNXX_SHPSERIAL_IF" 
   (	"SERIAL_TRANSACTION_ID" NUMBER, 
	"SOURCE_TYPE_CODE" VARCHAR2(30 BYTE), 
	"OPERATING_UNIT_ID" NUMBER, 
	"ORGANIZATION_CODE" VARCHAR2(3 BYTE), 
	"SOURCE_HEADER_ID" NUMBER, 
	"SOURCE_HEADER_NO" VARCHAR2(30 BYTE), 
	"SOURCE_LINE_ID" NUMBER, 
	"SOURCE_LINE_NO" NUMBER, 
	"MOVE_ORDER_LINE_ID" NUMBER, 
	"PICK_ORDER_NO" VARCHAR2(30 BYTE), 
	"PICK_SEQ_NO" NUMBER, 
	"DELIVERY_NO" VARCHAR2(30 BYTE), 
	"LOAD_CONFIRM_NO" VARCHAR2(30 BYTE), 
	"SHIPPING_SEQ_NO" NUMBER, 
	"ITEM_CODE" VARCHAR2(50 BYTE), 
	"SERIAL_NO" VARCHAR2(30 BYTE), 
	"PACKING_ID" VARCHAR2(20 BYTE), 
	"PACKING_TYPE" VARCHAR2(1 BYTE), 
	"CANCEL_FLAG" VARCHAR2(1 BYTE), 
	"TRANSFER_FLAG" VARCHAR2(1 BYTE), 
	"TRANSFER_DATE" DATE, 
	"GLOBAL_UNIQUE_ID" VARCHAR2(100 BYTE), 
	"BAM_SEQUENCE_ID" NUMBER, 
	"OLD_GLOBAL_UNIQUE_ID" VARCHAR2(100 BYTE), 
	"EDI_SENDER_ID" VARCHAR2(50 BYTE), 
	"EDI_RECEIVER_ID" VARCHAR2(50 BYTE), 
	"EDI_SUB_SENDER_ID" VARCHAR2(50 BYTE), 
	"EDI_SUB_RECEIVER_ID" VARCHAR2(50 BYTE), 
	"EDI_ENVELOPE_NO" VARCHAR2(50 BYTE), 
	"EDI_GROUP_NO" VARCHAR2(50 BYTE), 
	"EDI_TRANSACTION_NO" VARCHAR2(50 BYTE), 
	"STEP_CODE" VARCHAR2(30 BYTE), 
	"STEP_STATUS_CODE" VARCHAR2(30 BYTE), 
	"EDI_INTERFACE_DATE" DATE, 
	"EDI_FUNC_ACKNOWLDG_NO" VARCHAR2(70 BYTE), 
	"EDI_FUNC_ACKNOWLDG_DATE" DATE, 
	"EDI_FUNC_ACKNOWLDG_STATUS_CODE" VARCHAR2(5 BYTE), 
	"EDI_ERROR_CODE" VARCHAR2(20 BYTE), 
	"EDI_ERROR_MESSAGE_TEXT" VARCHAR2(4000 BYTE)
   ) ;

   COMMENT ON COLUMN "VNXX_SHPSERIAL_IF"."SERIAL_TRANSACTION_ID" IS 'Primary Key';
   COMMENT ON COLUMN "VNXX_SHPSERIAL_IF"."TRANSFER_FLAG" IS '??? Interface_FLAG';
   COMMENT ON COLUMN "VNXX_SHPSERIAL_IF"."TRANSFER_DATE" IS '??? SEND Date';
   COMMENT ON COLUMN "VNXX_SHPSERIAL_IF"."GLOBAL_UNIQUE_ID" IS 'Correlation ID';
   COMMENT ON COLUMN "VNXX_SHPSERIAL_IF"."BAM_SEQUENCE_ID" IS 'Data ???';
   COMMENT ON COLUMN "VNXX_SHPSERIAL_IF"."OLD_GLOBAL_UNIQUE_ID" IS 'GDH??? (Correlation ID)';
   COMMENT ON COLUMN "VNXX_SHPSERIAL_IF"."EDI_SENDER_ID" IS '??? TP ID';
   COMMENT ON COLUMN "VNXX_SHPSERIAL_IF"."EDI_RECEIVER_ID" IS '??? TP ID';
   COMMENT ON COLUMN "VNXX_SHPSERIAL_IF"."EDI_SUB_SENDER_ID" IS '??? group TP ID';
   COMMENT ON COLUMN "VNXX_SHPSERIAL_IF"."EDI_SUB_RECEIVER_ID" IS '??? group TP ID';
   COMMENT ON COLUMN "VNXX_SHPSERIAL_IF"."EDI_ENVELOPE_NO" IS 'EDI Envelope No';
   COMMENT ON COLUMN "VNXX_SHPSERIAL_IF"."EDI_GROUP_NO" IS 'EDI Group No';
   COMMENT ON COLUMN "VNXX_SHPSERIAL_IF"."EDI_TRANSACTION_NO" IS 'EDI Transaction No';
   COMMENT ON COLUMN "VNXX_SHPSERIAL_IF"."STEP_CODE" IS 'IHUB, B2BI';
   COMMENT ON COLUMN "VNXX_SHPSERIAL_IF"."STEP_STATUS_CODE" IS 'PROCESSING, SUCCESS';
   COMMENT ON COLUMN "VNXX_SHPSERIAL_IF"."EDI_INTERFACE_DATE" IS 'B2Bi Interface ?? ';
   COMMENT ON COLUMN "VNXX_SHPSERIAL_IF"."EDI_FUNC_ACKNOWLDG_NO" IS 'Ack EDI No';
   COMMENT ON COLUMN "VNXX_SHPSERIAL_IF"."EDI_FUNC_ACKNOWLDG_DATE" IS 'Ack ?? ??';
   COMMENT ON COLUMN "VNXX_SHPSERIAL_IF"."EDI_FUNC_ACKNOWLDG_STATUS_CODE" IS 'R,A';
   COMMENT ON COLUMN "VNXX_SHPSERIAL_IF"."EDI_ERROR_CODE" IS 'EDI Error ??';
   COMMENT ON COLUMN "VNXX_SHPSERIAL_IF"."EDI_ERROR_MESSAGE_TEXT" IS 'EDI Error Message';
--------------------------------------------------------
--  DDL for Table VNXX_SN_CBU_HIST_IF
--------------------------------------------------------

  CREATE TABLE "VNXX_SN_CBU_HIST_IF" 
   (	"LOT_ID" VARCHAR2(30 BYTE), 
	"MODEL_CODE" VARCHAR2(20 BYTE), 
	"SUFFIX" VARCHAR2(20 BYTE), 
	"LOT_BOX" VARCHAR2(50 BYTE), 
	"LOT_SET" VARCHAR2(50 BYTE), 
	"TRANSFER_DATE" DATE DEFAULT sysdate, 
	"SUB_CODE" VARCHAR2(20 BYTE)
   ) ;
--------------------------------------------------------
--  DDL for Table VNXX_SN_CDC_HIST_IF
--------------------------------------------------------

  CREATE TABLE "VNXX_SN_CDC_HIST_IF" 
   (	"INV_ORG" VARCHAR2(3 BYTE), 
	"LOADPLAN_NO" VARCHAR2(20 BYTE), 
	"SERIAL_NO" VARCHAR2(50 BYTE), 
	"BOX_NO" VARCHAR2(50 BYTE), 
	"SHIPTO_CODE" VARCHAR2(20 BYTE), 
	"SHIPTO_NAME" VARCHAR2(200 BYTE), 
	"SHIPTO_DATE" DATE, 
	"ORDER_NO" VARCHAR2(12 BYTE), 
	"CLOSED_DATE" DATE, 
	"INVOICE_NO" VARCHAR2(20 BYTE), 
	"INVOICE_DATE" DATE, 
	"CUSTOMER_CODE" VARCHAR2(20 BYTE), 
	"CUSTOMER_NAME" VARCHAR2(200 BYTE), 
	"TRANSFER_DATE" DATE DEFAULT sysdate, 
	"TRANSFER_STATUS" VARCHAR2(1 BYTE) DEFAULT 'N', 
	"TRANSFER_FLAG" VARCHAR2(1 BYTE) DEFAULT 'N', 
	"UNIQUE_ID" TIMESTAMP (6) DEFAULT current_timestamp, 
	"SEQ_NO" VARCHAR2(3 BYTE), 
	"MODEL_SUFFIX" VARCHAR2(30 BYTE), 
	"MODEL" VARCHAR2(20 BYTE), 
	"SUFFIX" VARCHAR2(20 BYTE)
   ) ;
--------------------------------------------------------
--  DDL for Table VNXX_SN_RDC_HIST_IF
--------------------------------------------------------

  CREATE TABLE "VNXX_SN_RDC_HIST_IF" 
   (	"INV_ORG" VARCHAR2(5 BYTE), 
	"EDI_NO" VARCHAR2(16 BYTE), 
	"SERIAL_NO" VARCHAR2(100 BYTE), 
	"BOX_NO" VARCHAR2(100 BYTE), 
	"MODEL_SUFFIX" VARCHAR2(20 BYTE), 
	"MODEL" VARCHAR2(20 BYTE), 
	"SUFFIX" VARCHAR2(20 BYTE), 
	"SHIP_NO" VARCHAR2(18 BYTE), 
	"LINE_NO" VARCHAR2(3 BYTE), 
	"OUT_DATE" DATE, 
	"TRANSFER_DATE" DATE DEFAULT sysdate, 
	"TRANSFER_FLAG" VARCHAR2(1 BYTE) DEFAULT 'N', 
	"TRANSFER_STATUS" VARCHAR2(1 BYTE) DEFAULT 'N'
   ) ;
--------------------------------------------------------
--  DDL for Table VXH_ORDER_SHIP_HIST
--------------------------------------------------------

  CREATE TABLE "VXH_ORDER_SHIP_HIST" 
   (	"INV_ORG" VARCHAR2(3 BYTE), 
	"SHIPTO_CODE" VARCHAR2(20 BYTE), 
	"SHIPTO_NAME" VARCHAR2(200 BYTE), 
	"CITY" VARCHAR2(20 BYTE), 
	"ORDER_NO" VARCHAR2(12 BYTE), 
	"LINE_NO" VARCHAR2(10 BYTE), 
	"LINE_STATUS" VARCHAR2(50 BYTE), 
	"PROD_DIV" VARCHAR2(20 BYTE), 
	"MODEL_SUFFIX" VARCHAR2(30 BYTE), 
	"ORDER_QTY" VARCHAR2(5 BYTE), 
	"RELEASE_QTY" VARCHAR2(5 BYTE), 
	"UNIT_SELL_PRICE" VARCHAR2(20 BYTE) DEFAULT '0', 
	"ORDER_AMT" VARCHAR2(20 BYTE) DEFAULT '0', 
	"INVOICE_NO" VARCHAR2(50 BYTE), 
	"PICK_NO" VARCHAR2(30 BYTE), 
	"DELIVERY_NO" VARCHAR2(40 BYTE), 
	"SUBINVENTORY" VARCHAR2(20 BYTE), 
	"BILLTO_CODE" VARCHAR2(30 BYTE), 
	"BILLTO_NAME" VARCHAR2(100 BYTE), 
	"MODEL" VARCHAR2(20 BYTE), 
	"SUFFIX" VARCHAR2(20 BYTE)
   ) ;
--------------------------------------------------------
--  DDL for Table XVH_ORDER_TEMP
--------------------------------------------------------

  CREATE TABLE "XVH_ORDER_TEMP" 
   (	"EDI_NO" VARCHAR2(50 BYTE), 
	"SHIPTO_CODE" VARCHAR2(100 BYTE), 
	"SHIPTO_NAME" VARCHAR2(200 BYTE), 
	"MODEL_SUFFIX" VARCHAR2(50 BYTE), 
	"BILLTO_CODE" VARCHAR2(100 BYTE), 
	"BILLTO_NAME" VARCHAR2(200 BYTE), 
	"SHIP_DATE" VARCHAR2(10 BYTE), 
	"DEL_DATE" VARCHAR2(10 BYTE), 
	"ARV_DATE" VARCHAR2(10 BYTE), 
	"QTY" VARCHAR2(10 BYTE), 
	"ORDER_NO" VARCHAR2(30 BYTE), 
	"LINE_NO" VARCHAR2(5 BYTE), 
	"INV_ORG" VARCHAR2(3 BYTE), 
	"LINE_STATUS" VARCHAR2(10 BYTE), 
	"RELEASE_QTY" VARCHAR2(10 BYTE)
   ) ;
--------------------------------------------------------
--  DDL for Table XVH_SN_RDC_HIST
--------------------------------------------------------

  CREATE TABLE "XVH_SN_RDC_HIST" 
   (	"INV_ORG" VARCHAR2(5 BYTE), 
	"EDI_NO" VARCHAR2(16 BYTE), 
	"SERIAL_NO" VARCHAR2(100 BYTE), 
	"BOX_NO" VARCHAR2(100 BYTE), 
	"MODEL_SUFFIX" VARCHAR2(20 BYTE), 
	"MODEL" VARCHAR2(20 BYTE), 
	"SUFFIX" VARCHAR2(20 BYTE), 
	"SHIP_NO" VARCHAR2(28 BYTE), 
	"LINE_NO" VARCHAR2(3 BYTE), 
	"OUT_DATE" VARCHAR2(8 BYTE)
   ) ;
--------------------------------------------------------
--  DDL for Table XVH_SN_TEMP
--------------------------------------------------------

  CREATE TABLE "XVH_SN_TEMP" 
   (	"SERIAL_NO" VARCHAR2(50 BYTE), 
	"EDI_NO" VARCHAR2(50 BYTE), 
	"LINE_NO" VARCHAR2(5 BYTE), 
	"MODEL_SUFFIX" VARCHAR2(50 BYTE), 
	"WH_DATE" VARCHAR2(20 BYTE), 
	"WT_START_DT" VARCHAR2(8 BYTE), 
	"WT_END_DT" VARCHAR2(8 BYTE)
   ) ;
--------------------------------------------------------
--  DDL for Table XVH_TEMP
--------------------------------------------------------

  CREATE TABLE "XVH_TEMP" 
   (	"SERIAL_NO" VARCHAR2(30 BYTE), 
	"MODEL_SUFFIX" VARCHAR2(50 BYTE), 
	"PRODUCT" VARCHAR2(10 BYTE), 
	"WT_START_DATE" DATE, 
	"WT_END_DATE" DATE
   ) ;
--------------------------------------------------------
--  DDL for Table XX_TEMP
--------------------------------------------------------

  CREATE TABLE "XX_TEMP" 
   (	"LOT_BOX" VARCHAR2(60 BYTE)
   ) ;
--------------------------------------------------------
--  DDL for Index PK_AC_INST_INF
--------------------------------------------------------

  CREATE UNIQUE INDEX "PK_AC_INST_INF" ON "TB_CM_AC_INSTALLER_INF" ("INST_CODE") 
  ;
--------------------------------------------------------
--  DDL for Index TB_CM_BILLTO_INF_PR_PK
--------------------------------------------------------

  CREATE UNIQUE INDEX "TB_CM_BILLTO_INF_PR_PK" ON "TB_CM_BILLTO_INF" ("BILLTO_CODE") 
  ;
--------------------------------------------------------
--  DDL for Index SYS_C0013688
--------------------------------------------------------

  CREATE UNIQUE INDEX "SYS_C0013688" ON "TB_CM_DISTRICT" ("ID") 
  ;
--------------------------------------------------------
--  DDL for Index TB_CM_INCENTIVE_ADHOC_PK
--------------------------------------------------------

  CREATE UNIQUE INDEX "TB_CM_INCENTIVE_ADHOC_PK" ON "TB_CM_INCENTIVE_ADHOC" ("SCHEME_ID", "SCHEME_NAME") 
  ;
--------------------------------------------------------
--  DDL for Index PK_CM_INT_ADHOC_DETAIL_PR
--------------------------------------------------------

  CREATE UNIQUE INDEX "PK_CM_INT_ADHOC_DETAIL_PR" ON "TB_CM_INCENTIVE_ADHOC_DETAIL" ("SCHEME_ID", "BILLTO_CODE", "MODEL") 
  ;
--------------------------------------------------------
--  DDL for Index TB_INCENTIVE_BALANCE_PK
--------------------------------------------------------

  CREATE UNIQUE INDEX "TB_INCENTIVE_BALANCE_PK" ON "TB_CM_INCENTIVE_BALANCE" ("YYYYMM", "SCHEME_ID", "SHOP_CODE", "MODEL") 
  ;
--------------------------------------------------------
--  DDL for Index TB_CM_SO_CLOSE_MST_PK
--------------------------------------------------------

  CREATE UNIQUE INDEX "TB_CM_SO_CLOSE_MST_PK" ON "TB_CM_INCENTIVE_CLOSE_MST" ("CLOSE_PERIOD") 
  ;
--------------------------------------------------------
--  DDL for Index TB_CM_INCENTIVE_MST_PK
--------------------------------------------------------

  CREATE UNIQUE INDEX "TB_CM_INCENTIVE_MST_PK" ON "TB_CM_INCENTIVE_MST" ("SCHEME_ID", "SCHEME_NAME") 
  ;
--------------------------------------------------------
--  DDL for Index PK_MODEL_MPR_PR
--------------------------------------------------------

  CREATE UNIQUE INDEX "PK_MODEL_MPR_PR" ON "TB_CM_MRP" ("MODEL") 
  ;
--------------------------------------------------------
--  DDL for Index TB_CM_ORG_PK
--------------------------------------------------------

  CREATE UNIQUE INDEX "TB_CM_ORG_PK" ON "TB_CM_ORGANIZATION" ("ORG_CODE") 
  ;
--------------------------------------------------------
--  DDL for Index SYS_C0013685
--------------------------------------------------------

  CREATE UNIQUE INDEX "SYS_C0013685" ON "TB_CM_PROVINCE" ("ID") 
  ;
--------------------------------------------------------
--  DDL for Index TB_CM_SHIPTO_INF_PK
--------------------------------------------------------

  CREATE UNIQUE INDEX "TB_CM_SHIPTO_INF_PK" ON "TB_CM_SHIPTO_INF" ("SHIPTO_CODE") 
  ;
--------------------------------------------------------
--  DDL for Index TB_CM_SHOP_BILLTO_PK
--------------------------------------------------------

  CREATE UNIQUE INDEX "TB_CM_SHOP_BILLTO_PK" ON "TB_CM_SHOP_BILLTO" ("BILLTO_CODE", "SHOP_CODE", "USE_FLAG") 
  ;
--------------------------------------------------------
--  DDL for Index TB_CM_SHOP_CELL_PK
--------------------------------------------------------

  CREATE UNIQUE INDEX "TB_CM_SHOP_CELL_PK" ON "TB_CM_SHOP_CELL" ("SHOP_CELL") 
  ;
--------------------------------------------------------
--  DDL for Index PK_SHOP_INF_PR
--------------------------------------------------------

  CREATE UNIQUE INDEX "PK_SHOP_INF_PR" ON "TB_CM_SHOP_INF" ("SHOP_CODE") 
  ;
--------------------------------------------------------
--  DDL for Index SYS_C0019294
--------------------------------------------------------

  CREATE UNIQUE INDEX "SYS_C0019294" ON "TB_CM_SYS_LOG" ("ID") 
  ;
--------------------------------------------------------
--  DDL for Index TB_DELIVERY_WH_HIST_PR_KEY
--------------------------------------------------------

  CREATE UNIQUE INDEX "TB_DELIVERY_WH_HIST_PR_KEY" ON "TB_DELIVERY_RDC_HIST" ("PICK_NO", "LINE_ID", "PLAN_NO", "DELIVERY_QTY", "DELIVERY_DATE", "MODEL", "SUFFIX", "SHIPTO_CODE") 
  ;
--------------------------------------------------------
--  DDL for Index TB_EDI_HIST_PK
--------------------------------------------------------

  CREATE UNIQUE INDEX "TB_EDI_HIST_PK" ON "TB_EDI_HIST" ("EDI_FILENAME", "ORG_CODE", "START_TIME") 
  ;
--------------------------------------------------------
--  DDL for Index TB_EDI_ITEM_PR_KEY
--------------------------------------------------------

  CREATE UNIQUE INDEX "TB_EDI_ITEM_PR_KEY" ON "TB_EDI_ITEM" ("ITEM_ID") 
  ;
--------------------------------------------------------
--  DDL for Index PK_TB_FTP_MC_PR
--------------------------------------------------------

  CREATE UNIQUE INDEX "PK_TB_FTP_MC_PR" ON "TB_FTP_MC" ("MC_NAME") 
  ;
--------------------------------------------------------
--  DDL for Index SYS_C0013633
--------------------------------------------------------

  CREATE UNIQUE INDEX "SYS_C0013633" ON "TB_LEVEL" ("ID") 
  ;
--------------------------------------------------------
--  DDL for Index SYS_C0013683
--------------------------------------------------------

  CREATE UNIQUE INDEX "SYS_C0013683" ON "TB_LEVEL_MENU" ("ID") 
  ;
--------------------------------------------------------
--  DDL for Index SYS_C0012453
--------------------------------------------------------

  CREATE UNIQUE INDEX "SYS_C0012453" ON "TB_MENU" ("ID") 
  ;
--------------------------------------------------------
--  DDL for Index PK_MT_SEQ_PR
--------------------------------------------------------

  CREATE UNIQUE INDEX "PK_MT_SEQ_PR" ON "TB_MT_SEND" ("MT_SEQ") 
  ;
--------------------------------------------------------
--  DDL for Index TB_MT_SMS_REP_MSG_PR_PK
--------------------------------------------------------

  CREATE UNIQUE INDEX "TB_MT_SMS_REP_MSG_PR_PK" ON "TB_MT_SMS_RESP_MSG" ("RESP_TYPE") 
  ;
--------------------------------------------------------
--  DDL for Index TB_NON_INCENTIVE_CUST_PK
--------------------------------------------------------

  CREATE UNIQUE INDEX "TB_NON_INCENTIVE_CUST_PK" ON "TB_NON_INCENTIVE_CUST" ("BILLTO_CODE") 
  ;
--------------------------------------------------------
--  DDL for Index PK_ORDER_SHIP_HIST_PR
--------------------------------------------------------

  CREATE UNIQUE INDEX "PK_ORDER_SHIP_HIST_PR" ON "TB_ORDER_SHIP_HIST" ("INV_ORG", "SHIPTO_CODE", "ORDER_NO", "LINE_NO", "ORDER_QTY", "RELEASE_QTY", "REQUEST_ARRIVAL_DATE", "MODEL", "SUFFIX") 
  ;
--------------------------------------------------------
--  DDL for Index TB_ORDER_NO_IDX
--------------------------------------------------------

  CREATE INDEX "TB_ORDER_NO_IDX" ON "TB_ORDER_SHIP_HIST" ("ORDER_NO") 
  ;
--------------------------------------------------------
--  DDL for Index TB_SN_CDC_HIST_PK
--------------------------------------------------------

  CREATE UNIQUE INDEX "TB_SN_CDC_HIST_PK" ON "TB_SN_CDC_HIST" ("INV_ORG", "ORDER_NO", "SHIPTO_CODE", "MODEL", "SERIAL_NO", "SUFFIX") 
  ;
--------------------------------------------------------
--  DDL for Index PK_SN_INSTALLER
--------------------------------------------------------

  CREATE UNIQUE INDEX "PK_SN_INSTALLER" ON "TB_SN_INSTALLER" ("SERIAL_NO", "MODEL") 
  ;
--------------------------------------------------------
--  DDL for Index TB_SN_PND_HIST_PK
--------------------------------------------------------

  CREATE UNIQUE INDEX "TB_SN_PND_HIST_PK" ON "TB_SN_PND_HIST" ("SERIAL_NO", "PND_TYPE") 
  ;
--------------------------------------------------------
--  DDL for Index TB_SN_RDC_HIST_IDX
--------------------------------------------------------

  CREATE INDEX "TB_SN_RDC_HIST_IDX" ON "TB_SN_RDC_HIST" ("SERIAL_NO", "MODEL") 
  ;
--------------------------------------------------------
--  DDL for Index TB_SN__RDC_HIST_PK
--------------------------------------------------------

  CREATE UNIQUE INDEX "TB_SN__RDC_HIST_PK" ON "TB_SN_RDC_HIST" ("SERIAL_NO", "OUT_DATE", "EDI_NO", "INV_ORG", "MODEL", "SUFFIX") 
  ;
--------------------------------------------------------
--  DDL for Index TB_SN_SO_WT_MST_PR_PK
--------------------------------------------------------

  CREATE UNIQUE INDEX "TB_SN_SO_WT_MST_PR_PK" ON "TB_SN_SO_WT_MST" ("SERIAL_NO", "MODEL") 
  ;
--------------------------------------------------------
--  DDL for Index TB_SN_SO_WT_MST0_PK
--------------------------------------------------------

  CREATE UNIQUE INDEX "TB_SN_SO_WT_MST0_PK" ON "TB_SN_SO_WT_MST0" ("SERIAL_NO", "MODEL") 
  ;
--------------------------------------------------------
--  DDL for Index SYS_C0012457
--------------------------------------------------------

  CREATE UNIQUE INDEX "SYS_C0012457" ON "TB_SUB_MENU" ("ID") 
  ;
--------------------------------------------------------
--  DDL for Index SYS_C0012440
--------------------------------------------------------

  CREATE UNIQUE INDEX "SYS_C0012440" ON "TB_USER" ("ID") 
  ;
--------------------------------------------------------
--  DDL for Index SYS_C0013636
--------------------------------------------------------

  CREATE UNIQUE INDEX "SYS_C0013636" ON "TB_USER_LEVEL" ("ID") 
  ;
--------------------------------------------------------
--  DDL for Index SYS_C0012460
--------------------------------------------------------

  CREATE UNIQUE INDEX "SYS_C0012460" ON "TB_USER_MENU" ("ID") 
  ;
--------------------------------------------------------
--  DDL for Index VNXX_DELIVERY_HIST_PR_KEY
--------------------------------------------------------

  CREATE UNIQUE INDEX "VNXX_DELIVERY_HIST_PR_KEY" ON "VNXX_DELIVERY_RDC_HIST_IF" ("PICK_NO", "LINE_ID", "DELIVERY_QTY", "DELIVERY_DATE", "PLAN_NO", "MODEL", "SUFFIX", "SHIPTO_CODE") 
  ;
--------------------------------------------------------
--  DDL for Index PK_VNXX_EDI_RESULT_PR
--------------------------------------------------------

  CREATE UNIQUE INDEX "PK_VNXX_EDI_RESULT_PR" ON "VNXX_EDI_RESULT" ("EDI_DATE", "EDI_TYPE") 
  ;
--------------------------------------------------------
--  DDL for Index VNXX_ORDER_SHIP_HIST_PR_KEY
--------------------------------------------------------

  CREATE UNIQUE INDEX "VNXX_ORDER_SHIP_HIST_PR_KEY" ON "VNXX_ORDER_SHIP_HIST_IF" ("ORDER_NO", "MODEL", "SUFFIX", "SHIPTO_CODE", "ORDER_QTY", "INV_ORG") 
  ;
--------------------------------------------------------
--  DDL for Index VNXX_ORDER_NO_IDX
--------------------------------------------------------

  CREATE INDEX "VNXX_ORDER_NO_IDX" ON "VNXX_ORDER_SHIP_HIST_IF" ("ORDER_NO") 
  ;
--------------------------------------------------------
--  DDL for Index PK_VNXXSHPCFM_PR
--------------------------------------------------------

  CREATE UNIQUE INDEX "PK_VNXXSHPCFM_PR" ON "VNXX_SHPCFM_IF" ("INTERFACE_ID") 
  ;
--------------------------------------------------------
--  DDL for Index PK_VNXX_SERIAL_PR
--------------------------------------------------------

  CREATE UNIQUE INDEX "PK_VNXX_SERIAL_PR" ON "VNXX_SHPSERIAL_IF" ("SERIAL_TRANSACTION_ID") 
  ;
--------------------------------------------------------
--  DDL for Index VNXX_SN_RDC_HIST_PK
--------------------------------------------------------

  CREATE UNIQUE INDEX "VNXX_SN_RDC_HIST_PK" ON "VNXX_SN_RDC_HIST_IF" ("INV_ORG", "SERIAL_NO", "MODEL", "SUFFIX", "OUT_DATE") 
  ;
--------------------------------------------------------
--  DDL for Index PK_XVH_ORDER_SHIP_HIST_PR
--------------------------------------------------------

  CREATE UNIQUE INDEX "PK_XVH_ORDER_SHIP_HIST_PR" ON "VXH_ORDER_SHIP_HIST" ("INV_ORG", "SHIPTO_CODE", "ORDER_NO", "LINE_NO", "ORDER_QTY", "RELEASE_QTY", "MODEL", "SUFFIX") 
  ;
--------------------------------------------------------
--  DDL for Index XVH_SN__RDC_HIST_PK
--------------------------------------------------------

  CREATE UNIQUE INDEX "XVH_SN__RDC_HIST_PK" ON "XVH_SN_RDC_HIST" ("SERIAL_NO", "EDI_NO", "INV_ORG", "MODEL", "SUFFIX") 
  ;
--------------------------------------------------------
--  DDL for Index PR_XX_TEMP
--------------------------------------------------------

  CREATE UNIQUE INDEX "PR_XX_TEMP" ON "XX_TEMP" ("LOT_BOX") 
  ;
--------------------------------------------------------
--  Constraints for Table TB_CM_AC_INSTALLER_INF
--------------------------------------------------------

  ALTER TABLE "TB_CM_AC_INSTALLER_INF" MODIFY ("SMS_CELL#" NOT NULL ENABLE);
  ALTER TABLE "TB_CM_AC_INSTALLER_INF" ADD CONSTRAINT "PK_AC_INST_INF" PRIMARY KEY ("INST_CODE") ENABLE;
  ALTER TABLE "TB_CM_AC_INSTALLER_INF" MODIFY ("BILLTO_CODE" NOT NULL ENABLE);
  ALTER TABLE "TB_CM_AC_INSTALLER_INF" MODIFY ("INST_NAME" NOT NULL ENABLE);
  ALTER TABLE "TB_CM_AC_INSTALLER_INF" MODIFY ("INST_CODE" NOT NULL ENABLE);
--------------------------------------------------------
--  Constraints for Table TB_CM_BILLTO_INF
--------------------------------------------------------

  ALTER TABLE "TB_CM_BILLTO_INF" ADD CONSTRAINT "TB_CM_BILLTO_INF_PR_PK" PRIMARY KEY ("BILLTO_CODE") ENABLE;
  ALTER TABLE "TB_CM_BILLTO_INF" MODIFY ("SHORT_NAME" NOT NULL ENABLE);
  ALTER TABLE "TB_CM_BILLTO_INF" MODIFY ("BILLTO_CODE" NOT NULL ENABLE);
--------------------------------------------------------
--  Constraints for Table TB_CM_DISTRICT
--------------------------------------------------------

  ALTER TABLE "TB_CM_DISTRICT" ADD PRIMARY KEY ("ID") ENABLE;
  ALTER TABLE "TB_CM_DISTRICT" MODIFY ("NAME" NOT NULL ENABLE);
  ALTER TABLE "TB_CM_DISTRICT" MODIFY ("PROVINCE_ID" NOT NULL ENABLE);
--------------------------------------------------------
--  Constraints for Table TB_CM_INCENTIVE_ADHOC
--------------------------------------------------------

  ALTER TABLE "TB_CM_INCENTIVE_ADHOC" ADD CONSTRAINT "TB_CM_INCENTIVE_ADHOC_PK" PRIMARY KEY ("SCHEME_ID", "SCHEME_NAME") ENABLE;
  ALTER TABLE "TB_CM_INCENTIVE_ADHOC" MODIFY ("UPDATE_DATE" NOT NULL ENABLE);
  ALTER TABLE "TB_CM_INCENTIVE_ADHOC" MODIFY ("CREATE_USER" NOT NULL ENABLE);
  ALTER TABLE "TB_CM_INCENTIVE_ADHOC" MODIFY ("END_DATE" NOT NULL ENABLE);
  ALTER TABLE "TB_CM_INCENTIVE_ADHOC" MODIFY ("START_DATE" NOT NULL ENABLE);
  ALTER TABLE "TB_CM_INCENTIVE_ADHOC" MODIFY ("SCHEME_NAME" NOT NULL ENABLE);
  ALTER TABLE "TB_CM_INCENTIVE_ADHOC" MODIFY ("SCHEME_ID" NOT NULL ENABLE);
--------------------------------------------------------
--  Constraints for Table TB_CM_INCENTIVE_ADHOC_DETAIL
--------------------------------------------------------

  ALTER TABLE "TB_CM_INCENTIVE_ADHOC_DETAIL" ADD CONSTRAINT "PK_CM_INT_ADHOC_DETAIL_PR" PRIMARY KEY ("SCHEME_ID", "BILLTO_CODE", "MODEL") ENABLE;
  ALTER TABLE "TB_CM_INCENTIVE_ADHOC_DETAIL" MODIFY ("REGION" NOT NULL ENABLE);
  ALTER TABLE "TB_CM_INCENTIVE_ADHOC_DETAIL" MODIFY ("CREATE_USER" NOT NULL ENABLE);
  ALTER TABLE "TB_CM_INCENTIVE_ADHOC_DETAIL" MODIFY ("AMT" NOT NULL ENABLE);
  ALTER TABLE "TB_CM_INCENTIVE_ADHOC_DETAIL" MODIFY ("POINT" NOT NULL ENABLE);
  ALTER TABLE "TB_CM_INCENTIVE_ADHOC_DETAIL" MODIFY ("UNIT" NOT NULL ENABLE);
  ALTER TABLE "TB_CM_INCENTIVE_ADHOC_DETAIL" MODIFY ("MODEL" NOT NULL ENABLE);
  ALTER TABLE "TB_CM_INCENTIVE_ADHOC_DETAIL" MODIFY ("BILLTO_CODE" NOT NULL ENABLE);
  ALTER TABLE "TB_CM_INCENTIVE_ADHOC_DETAIL" MODIFY ("SCHEME_ID" NOT NULL ENABLE);
--------------------------------------------------------
--  Constraints for Table TB_CM_INCENTIVE_BALANCE
--------------------------------------------------------

  ALTER TABLE "TB_CM_INCENTIVE_BALANCE" ADD CONSTRAINT "TB_INCENTIVE_BALANCE_PK" PRIMARY KEY ("YYYYMM", "SCHEME_ID", "SHOP_CODE", "MODEL") ENABLE;
  ALTER TABLE "TB_CM_INCENTIVE_BALANCE" MODIFY ("MODEL" NOT NULL ENABLE);
  ALTER TABLE "TB_CM_INCENTIVE_BALANCE" MODIFY ("SHOP_CODE" NOT NULL ENABLE);
  ALTER TABLE "TB_CM_INCENTIVE_BALANCE" MODIFY ("SCHEME_ID" NOT NULL ENABLE);
  ALTER TABLE "TB_CM_INCENTIVE_BALANCE" MODIFY ("YYYYMM" NOT NULL ENABLE);
--------------------------------------------------------
--  Constraints for Table TB_CM_INCENTIVE_CLOSE_MST
--------------------------------------------------------

  ALTER TABLE "TB_CM_INCENTIVE_CLOSE_MST" ADD CONSTRAINT "TB_CM_SO_CLOSE_MST_PK" PRIMARY KEY ("CLOSE_PERIOD") ENABLE;
  ALTER TABLE "TB_CM_INCENTIVE_CLOSE_MST" MODIFY ("CLOSE_PERIOD" NOT NULL ENABLE);
--------------------------------------------------------
--  Constraints for Table TB_CM_INCENTIVE_DETAIL
--------------------------------------------------------

  ALTER TABLE "TB_CM_INCENTIVE_DETAIL" MODIFY ("REGION" NOT NULL ENABLE);
  ALTER TABLE "TB_CM_INCENTIVE_DETAIL" MODIFY ("CREATE_USER" NOT NULL ENABLE);
  ALTER TABLE "TB_CM_INCENTIVE_DETAIL" MODIFY ("AMT" NOT NULL ENABLE);
  ALTER TABLE "TB_CM_INCENTIVE_DETAIL" MODIFY ("POINT" NOT NULL ENABLE);
  ALTER TABLE "TB_CM_INCENTIVE_DETAIL" MODIFY ("UNIT" NOT NULL ENABLE);
  ALTER TABLE "TB_CM_INCENTIVE_DETAIL" MODIFY ("MODEL" NOT NULL ENABLE);
  ALTER TABLE "TB_CM_INCENTIVE_DETAIL" MODIFY ("SCHEME_ID" NOT NULL ENABLE);
--------------------------------------------------------
--  Constraints for Table TB_CM_INCENTIVE_MST
--------------------------------------------------------

  ALTER TABLE "TB_CM_INCENTIVE_MST" ADD CONSTRAINT "TB_CM_INCENTIVE_MST_PK" PRIMARY KEY ("SCHEME_ID", "SCHEME_NAME") ENABLE;
  ALTER TABLE "TB_CM_INCENTIVE_MST" MODIFY ("UPDATE_DATE" NOT NULL ENABLE);
  ALTER TABLE "TB_CM_INCENTIVE_MST" MODIFY ("CREATE_USER" NOT NULL ENABLE);
  ALTER TABLE "TB_CM_INCENTIVE_MST" MODIFY ("END_DATE" NOT NULL ENABLE);
  ALTER TABLE "TB_CM_INCENTIVE_MST" MODIFY ("START_DATE" NOT NULL ENABLE);
  ALTER TABLE "TB_CM_INCENTIVE_MST" MODIFY ("SCHEME_NAME" NOT NULL ENABLE);
  ALTER TABLE "TB_CM_INCENTIVE_MST" MODIFY ("SCHEME_ID" NOT NULL ENABLE);
--------------------------------------------------------
--  Constraints for Table TB_CM_MODEL_CAT
--------------------------------------------------------

  ALTER TABLE "TB_CM_MODEL_CAT" MODIFY ("MODEL" NOT NULL ENABLE);
  ALTER TABLE "TB_CM_MODEL_CAT" ADD CONSTRAINT "TB_CM_PROD_CAT_PR_KEY" UNIQUE ("MODEL") DISABLE;
--------------------------------------------------------
--  Constraints for Table TB_CM_MRP
--------------------------------------------------------

  ALTER TABLE "TB_CM_MRP" ADD CONSTRAINT "PK_MODEL_MPR_PR" UNIQUE ("MODEL") ENABLE;
--------------------------------------------------------
--  Constraints for Table TB_CM_ORGANIZATION
--------------------------------------------------------

  ALTER TABLE "TB_CM_ORGANIZATION" ADD CONSTRAINT "TB_CM_ORG_PK" PRIMARY KEY ("ORG_CODE") ENABLE;
--------------------------------------------------------
--  Constraints for Table TB_CM_PROVINCE
--------------------------------------------------------

  ALTER TABLE "TB_CM_PROVINCE" ADD PRIMARY KEY ("ID") ENABLE;
  ALTER TABLE "TB_CM_PROVINCE" MODIFY ("NAME" NOT NULL ENABLE);
--------------------------------------------------------
--  Constraints for Table TB_CM_REGION
--------------------------------------------------------

  ALTER TABLE "TB_CM_REGION" MODIFY ("NAME" NOT NULL ENABLE);
  ALTER TABLE "TB_CM_REGION" MODIFY ("ID" NOT NULL ENABLE);
--------------------------------------------------------
--  Constraints for Table TB_CM_SHIPTO_INF
--------------------------------------------------------

  ALTER TABLE "TB_CM_SHIPTO_INF" ADD CONSTRAINT "TB_CM_SHIPTO_INF_PK" PRIMARY KEY ("SHIPTO_CODE") ENABLE;
  ALTER TABLE "TB_CM_SHIPTO_INF" MODIFY ("SHIPTO_NAME" NOT NULL ENABLE);
  ALTER TABLE "TB_CM_SHIPTO_INF" MODIFY ("SHIPTO_CODE" NOT NULL ENABLE);
  ALTER TABLE "TB_CM_SHIPTO_INF" MODIFY ("BILLTO_CODE" NOT NULL ENABLE);
--------------------------------------------------------
--  Constraints for Table TB_CM_SHOP_BILLTO
--------------------------------------------------------

  ALTER TABLE "TB_CM_SHOP_BILLTO" ADD CONSTRAINT "TB_CM_SHOP_BILLTO_PK" PRIMARY KEY ("BILLTO_CODE", "SHOP_CODE", "USE_FLAG") ENABLE;
  ALTER TABLE "TB_CM_SHOP_BILLTO" MODIFY ("SHOP_CODE" NOT NULL ENABLE);
  ALTER TABLE "TB_CM_SHOP_BILLTO" MODIFY ("BILLTO_CODE" NOT NULL ENABLE);
--------------------------------------------------------
--  Constraints for Table TB_CM_SHOP_CELL
--------------------------------------------------------

  ALTER TABLE "TB_CM_SHOP_CELL" ADD CONSTRAINT "TB_CM_SHOP_CELL_PK" PRIMARY KEY ("SHOP_CELL") ENABLE;
  ALTER TABLE "TB_CM_SHOP_CELL" MODIFY ("USE_FLAG" NOT NULL ENABLE);
  ALTER TABLE "TB_CM_SHOP_CELL" MODIFY ("SHOP_CELL" NOT NULL ENABLE);
  ALTER TABLE "TB_CM_SHOP_CELL" MODIFY ("SHOP_ID" NOT NULL ENABLE);
--------------------------------------------------------
--  Constraints for Table TB_CM_SHOP_INF
--------------------------------------------------------

  ALTER TABLE "TB_CM_SHOP_INF" ADD CONSTRAINT "PK_SHOP_INF_PR" PRIMARY KEY ("SHOP_CODE") ENABLE;
  ALTER TABLE "TB_CM_SHOP_INF" MODIFY ("USE_FLAG" NOT NULL ENABLE);
  ALTER TABLE "TB_CM_SHOP_INF" MODIFY ("CELL_NO#1" NOT NULL ENABLE);
  ALTER TABLE "TB_CM_SHOP_INF" MODIFY ("SHOP_NAME" NOT NULL ENABLE);
  ALTER TABLE "TB_CM_SHOP_INF" MODIFY ("SHOP_CODE" NOT NULL ENABLE);
--------------------------------------------------------
--  Constraints for Table TB_CM_SN_INF_DEC
--------------------------------------------------------

  ALTER TABLE "TB_CM_SN_INF_DEC" MODIFY ("UPDATE_DATE" NOT NULL ENABLE);
  ALTER TABLE "TB_CM_SN_INF_DEC" MODIFY ("CREATE_DATE" NOT NULL ENABLE);
--------------------------------------------------------
--  Constraints for Table TB_CM_SUB_INF
--------------------------------------------------------

  ALTER TABLE "TB_CM_SUB_INF" MODIFY ("SUB_CODE" NOT NULL ENABLE);
--------------------------------------------------------
--  Constraints for Table TB_CM_SYS_LOG
--------------------------------------------------------

  ALTER TABLE "TB_CM_SYS_LOG" ADD PRIMARY KEY ("ID") ENABLE;
  ALTER TABLE "TB_CM_SYS_LOG" MODIFY ("TITLE" NOT NULL ENABLE);
  ALTER TABLE "TB_CM_SYS_LOG" MODIFY ("ENTRY_USER_ID" NOT NULL ENABLE);
--------------------------------------------------------
--  Constraints for Table TB_DELIVERY_RDC_HIST
--------------------------------------------------------

  ALTER TABLE "TB_DELIVERY_RDC_HIST" MODIFY ("CREATE_DATE" NOT NULL ENABLE);
  ALTER TABLE "TB_DELIVERY_RDC_HIST" MODIFY ("DELIVERY_DATE" NOT NULL ENABLE);
  ALTER TABLE "TB_DELIVERY_RDC_HIST" MODIFY ("DELIVERY_QTY" NOT NULL ENABLE);
  ALTER TABLE "TB_DELIVERY_RDC_HIST" ADD CONSTRAINT "TB_DELIVERY_WH_HIST_PR_KEY" PRIMARY KEY ("PICK_NO", "LINE_ID", "PLAN_NO", "DELIVERY_QTY", "DELIVERY_DATE", "MODEL", "SUFFIX", "SHIPTO_CODE") ENABLE;
  ALTER TABLE "TB_DELIVERY_RDC_HIST" MODIFY ("MODEL_SUFFIX" NOT NULL ENABLE);
  ALTER TABLE "TB_DELIVERY_RDC_HIST" MODIFY ("SHIPTO_CODE" NOT NULL ENABLE);
  ALTER TABLE "TB_DELIVERY_RDC_HIST" MODIFY ("PICK_NO" NOT NULL ENABLE);
  ALTER TABLE "TB_DELIVERY_RDC_HIST" MODIFY ("PLAN_NO" NOT NULL ENABLE);
  ALTER TABLE "TB_DELIVERY_RDC_HIST" MODIFY ("DELIVERY_NO" NOT NULL ENABLE);
  ALTER TABLE "TB_DELIVERY_RDC_HIST" MODIFY ("INV_ORG" NOT NULL ENABLE);
--------------------------------------------------------
--  Constraints for Table TB_EDI_HIST
--------------------------------------------------------

  ALTER TABLE "TB_EDI_HIST" MODIFY ("ITEM_ID" NOT NULL ENABLE);
  ALTER TABLE "TB_EDI_HIST" MODIFY ("ORG_CODE" NOT NULL ENABLE);
  ALTER TABLE "TB_EDI_HIST" ADD CONSTRAINT "TB_EDI_HIST_PK" PRIMARY KEY ("EDI_FILENAME", "ORG_CODE", "START_TIME") ENABLE;
  ALTER TABLE "TB_EDI_HIST" MODIFY ("EDI_MACADDRESS" NOT NULL ENABLE);
  ALTER TABLE "TB_EDI_HIST" MODIFY ("ORG_SIDE" NOT NULL ENABLE);
  ALTER TABLE "TB_EDI_HIST" MODIFY ("EDI_DATE" NOT NULL ENABLE);
  ALTER TABLE "TB_EDI_HIST" MODIFY ("ROW_NUMBER" NOT NULL ENABLE);
  ALTER TABLE "TB_EDI_HIST" MODIFY ("EDI_MACHINENAME" NOT NULL ENABLE);
  ALTER TABLE "TB_EDI_HIST" MODIFY ("EDI_USERNAME" NOT NULL ENABLE);
  ALTER TABLE "TB_EDI_HIST" MODIFY ("EDI_FILENAME" NOT NULL ENABLE);
  ALTER TABLE "TB_EDI_HIST" MODIFY ("UNIQUE_ID" NOT NULL ENABLE);
--------------------------------------------------------
--  Constraints for Table TB_EDI_ITEM
--------------------------------------------------------

  ALTER TABLE "TB_EDI_ITEM" MODIFY ("CREATE_DATE" NOT NULL ENABLE);
  ALTER TABLE "TB_EDI_ITEM" MODIFY ("ITEM_NAME" NOT NULL ENABLE);
  ALTER TABLE "TB_EDI_ITEM" MODIFY ("ORG_SIDE" NOT NULL ENABLE);
  ALTER TABLE "TB_EDI_ITEM" MODIFY ("ITEM_ID" NOT NULL ENABLE);
  ALTER TABLE "TB_EDI_ITEM" ADD CONSTRAINT "TB_EDI_ITEM_PR_KEY" PRIMARY KEY ("ITEM_ID") ENABLE;
--------------------------------------------------------
--  Constraints for Table TB_FTP_MC
--------------------------------------------------------

  ALTER TABLE "TB_FTP_MC" ADD CONSTRAINT "PK_TB_FTP_MC_PR" PRIMARY KEY ("MC_NAME") ENABLE;
  ALTER TABLE "TB_FTP_MC" MODIFY ("ID" NOT NULL ENABLE);
  ALTER TABLE "TB_FTP_MC" MODIFY ("MC_NAME" NOT NULL ENABLE);
--------------------------------------------------------
--  Constraints for Table TB_LEVEL
--------------------------------------------------------

  ALTER TABLE "TB_LEVEL" ADD PRIMARY KEY ("ID") ENABLE;
  ALTER TABLE "TB_LEVEL" MODIFY ("NAME" NOT NULL ENABLE);
--------------------------------------------------------
--  Constraints for Table TB_LEVEL_MENU
--------------------------------------------------------

  ALTER TABLE "TB_LEVEL_MENU" ADD PRIMARY KEY ("ID") ENABLE;
  ALTER TABLE "TB_LEVEL_MENU" MODIFY ("MENU_ID" NOT NULL ENABLE);
  ALTER TABLE "TB_LEVEL_MENU" MODIFY ("LEVEL_ID" NOT NULL ENABLE);
--------------------------------------------------------
--  Constraints for Table TB_MENU
--------------------------------------------------------

  ALTER TABLE "TB_MENU" ADD PRIMARY KEY ("ID") ENABLE;
  ALTER TABLE "TB_MENU" MODIFY ("ACTIVE" NOT NULL ENABLE);
  ALTER TABLE "TB_MENU" MODIFY ("CODE" NOT NULL ENABLE);
--------------------------------------------------------
--  Constraints for Table TB_MO_HIST
--------------------------------------------------------

  ALTER TABLE "TB_MO_HIST" MODIFY ("RECEIVE_TIME" NOT NULL ENABLE);
  ALTER TABLE "TB_MO_HIST" MODIFY ("CMDCODE" NOT NULL ENABLE);
  ALTER TABLE "TB_MO_HIST" MODIFY ("MOSEQ" NOT NULL ENABLE);
  ALTER TABLE "TB_MO_HIST" MODIFY ("FILEDATE" NOT NULL ENABLE);
  ALTER TABLE "TB_MO_HIST" MODIFY ("FILENAME" NOT NULL ENABLE);
  ALTER TABLE "TB_MO_HIST" MODIFY ("MSGBODY" NOT NULL ENABLE);
  ALTER TABLE "TB_MO_HIST" MODIFY ("CELL_NO" NOT NULL ENABLE);
--------------------------------------------------------
--  Constraints for Table TB_MT_HIST
--------------------------------------------------------

  ALTER TABLE "TB_MT_HIST" MODIFY ("SEND_FLAG" NOT NULL ENABLE);
  ALTER TABLE "TB_MT_HIST" MODIFY ("CMDCODE" NOT NULL ENABLE);
  ALTER TABLE "TB_MT_HIST" MODIFY ("MSGTYPE" NOT NULL ENABLE);
  ALTER TABLE "TB_MT_HIST" MODIFY ("MSGBODY" NOT NULL ENABLE);
  ALTER TABLE "TB_MT_HIST" MODIFY ("CELL_NO" NOT NULL ENABLE);
  ALTER TABLE "TB_MT_HIST" MODIFY ("SHORTCODE" NOT NULL ENABLE);
  ALTER TABLE "TB_MT_HIST" MODIFY ("MOSEQ" NOT NULL ENABLE);
--------------------------------------------------------
--  Constraints for Table TB_MT_SEND
--------------------------------------------------------

  ALTER TABLE "TB_MT_SEND" ADD CONSTRAINT "PK_MT_SEQ_PR" PRIMARY KEY ("MT_SEQ") ENABLE;
  ALTER TABLE "TB_MT_SEND" MODIFY ("MT_SEQ" NOT NULL ENABLE);
  ALTER TABLE "TB_MT_SEND" MODIFY ("MSGTYPE" NOT NULL ENABLE);
  ALTER TABLE "TB_MT_SEND" MODIFY ("MSGBODY" NOT NULL ENABLE);
  ALTER TABLE "TB_MT_SEND" MODIFY ("CELL_NO" NOT NULL ENABLE);
  ALTER TABLE "TB_MT_SEND" MODIFY ("SHORTCODE" NOT NULL ENABLE);
  ALTER TABLE "TB_MT_SEND" MODIFY ("MOSEQ" NOT NULL ENABLE);
--------------------------------------------------------
--  Constraints for Table TB_MT_SMS_RESP_MSG
--------------------------------------------------------

  ALTER TABLE "TB_MT_SMS_RESP_MSG" ADD CONSTRAINT "TB_MT_SMS_REP_MSG_PR_PK" PRIMARY KEY ("RESP_TYPE") ENABLE;
  ALTER TABLE "TB_MT_SMS_RESP_MSG" MODIFY ("CREATE_DATE" NOT NULL ENABLE);
  ALTER TABLE "TB_MT_SMS_RESP_MSG" MODIFY ("RESP_TYPE" NOT NULL ENABLE);
--------------------------------------------------------
--  Constraints for Table TB_NON_INCENTIVE_CUST
--------------------------------------------------------

  ALTER TABLE "TB_NON_INCENTIVE_CUST" ADD CONSTRAINT "TB_NON_INCENTIVE_CUST_PK" PRIMARY KEY ("BILLTO_CODE") ENABLE;
  ALTER TABLE "TB_NON_INCENTIVE_CUST" MODIFY ("BILLTO_NAME" NOT NULL ENABLE);
  ALTER TABLE "TB_NON_INCENTIVE_CUST" MODIFY ("BILLTO_CODE" NOT NULL ENABLE);
--------------------------------------------------------
--  Constraints for Table TB_ORDER_SHIP_HIST
--------------------------------------------------------

  ALTER TABLE "TB_ORDER_SHIP_HIST" MODIFY ("UNIQUE_ID" NOT NULL ENABLE);
  ALTER TABLE "TB_ORDER_SHIP_HIST" MODIFY ("ORDER_NO" NOT NULL ENABLE);
  ALTER TABLE "TB_ORDER_SHIP_HIST" ADD CONSTRAINT "PK_ORDER_SHIP_HIST_PR" PRIMARY KEY ("INV_ORG", "SHIPTO_CODE", "ORDER_NO", "LINE_NO", "ORDER_QTY", "RELEASE_QTY", "REQUEST_ARRIVAL_DATE", "MODEL", "SUFFIX") ENABLE;
  ALTER TABLE "TB_ORDER_SHIP_HIST" MODIFY ("INV_ORG" NOT NULL ENABLE);
--------------------------------------------------------
--  Constraints for Table TB_SN_CDC_HIST
--------------------------------------------------------

  ALTER TABLE "TB_SN_CDC_HIST" MODIFY ("UNIQUE_ID" NOT NULL ENABLE);
  ALTER TABLE "TB_SN_CDC_HIST" MODIFY ("ORDER_NO" NOT NULL ENABLE);
  ALTER TABLE "TB_SN_CDC_HIST" MODIFY ("SHIPTO_CODE" NOT NULL ENABLE);
  ALTER TABLE "TB_SN_CDC_HIST" MODIFY ("SERIAL_NO" NOT NULL ENABLE);
  ALTER TABLE "TB_SN_CDC_HIST" MODIFY ("LOADPLAN_NO" NOT NULL ENABLE);
  ALTER TABLE "TB_SN_CDC_HIST" MODIFY ("INV_ORG" NOT NULL ENABLE);
  ALTER TABLE "TB_SN_CDC_HIST" MODIFY ("MODEL_SUFFIX" NOT NULL ENABLE);
  ALTER TABLE "TB_SN_CDC_HIST" ADD CONSTRAINT "TB_SN_CDC_HIST_PK" PRIMARY KEY ("INV_ORG", "ORDER_NO", "SHIPTO_CODE", "MODEL", "SERIAL_NO", "SUFFIX") ENABLE;
--------------------------------------------------------
--  Constraints for Table TB_SN_INSTALLER
--------------------------------------------------------

  ALTER TABLE "TB_SN_INSTALLER" MODIFY ("INC_CFM_FLAG" NOT NULL ENABLE);
  ALTER TABLE "TB_SN_INSTALLER" MODIFY ("ISL_DATE" NOT NULL ENABLE);
  ALTER TABLE "TB_SN_INSTALLER" MODIFY ("SERIAL_NO" NOT NULL ENABLE);
  ALTER TABLE "TB_SN_INSTALLER" ADD CONSTRAINT "PK_SN_INSTALLER" PRIMARY KEY ("SERIAL_NO", "MODEL") ENABLE;
  ALTER TABLE "TB_SN_INSTALLER" MODIFY ("ISL_CODE" NOT NULL ENABLE);
--------------------------------------------------------
--  Constraints for Table TB_SN_PND_HIST
--------------------------------------------------------

  ALTER TABLE "TB_SN_PND_HIST" ADD CONSTRAINT "TB_SN_PND_HIST_PK" PRIMARY KEY ("SERIAL_NO", "PND_TYPE") ENABLE;
  ALTER TABLE "TB_SN_PND_HIST" MODIFY ("SERIAL_NO" NOT NULL ENABLE);
  ALTER TABLE "TB_SN_PND_HIST" MODIFY ("PND_TYPE" NOT NULL ENABLE);
--------------------------------------------------------
--  Constraints for Table TB_SN_RDC_HIST
--------------------------------------------------------

  ALTER TABLE "TB_SN_RDC_HIST" ADD CONSTRAINT "TB_SN__RDC_HIST_PK" PRIMARY KEY ("SERIAL_NO", "OUT_DATE", "EDI_NO", "INV_ORG", "MODEL", "SUFFIX") ENABLE;
  ALTER TABLE "TB_SN_RDC_HIST" MODIFY ("INCENTIVE_FLAG" NOT NULL ENABLE);
  ALTER TABLE "TB_SN_RDC_HIST" MODIFY ("SELLOUT_STATUS" NOT NULL ENABLE);
  ALTER TABLE "TB_SN_RDC_HIST" MODIFY ("CREATE_DATE" NOT NULL ENABLE);
  ALTER TABLE "TB_SN_RDC_HIST" MODIFY ("SUFFIX" NOT NULL ENABLE);
  ALTER TABLE "TB_SN_RDC_HIST" MODIFY ("MODEL_SUFFIX" NOT NULL ENABLE);
  ALTER TABLE "TB_SN_RDC_HIST" MODIFY ("SERIAL_NO" NOT NULL ENABLE);
  ALTER TABLE "TB_SN_RDC_HIST" MODIFY ("EDI_NO" NOT NULL ENABLE);
  ALTER TABLE "TB_SN_RDC_HIST" MODIFY ("INV_ORG" NOT NULL ENABLE);
  ALTER TABLE "TB_SN_RDC_HIST" MODIFY ("MODEL" NOT NULL ENABLE);
--------------------------------------------------------
--  Constraints for Table TB_SN_SO_DEALERS
--------------------------------------------------------

  ALTER TABLE "TB_SN_SO_DEALERS" MODIFY ("VRF_FLAG" NOT NULL ENABLE);
  ALTER TABLE "TB_SN_SO_DEALERS" MODIFY ("SELLOUT_DATE" NOT NULL ENABLE);
  ALTER TABLE "TB_SN_SO_DEALERS" MODIFY ("EDI_NO" NOT NULL ENABLE);
  ALTER TABLE "TB_SN_SO_DEALERS" MODIFY ("SHOP_CODE" NOT NULL ENABLE);
--------------------------------------------------------
--  Constraints for Table TB_SN_SO_WT_MST
--------------------------------------------------------

  ALTER TABLE "TB_SN_SO_WT_MST" ADD CONSTRAINT "TB_SN_SO_WT_MST_PR_PK" PRIMARY KEY ("SERIAL_NO", "MODEL") ENABLE;
  ALTER TABLE "TB_SN_SO_WT_MST" MODIFY ("SHOP_CODE" NOT NULL ENABLE);
  ALTER TABLE "TB_SN_SO_WT_MST" MODIFY ("SERIAL_NO" NOT NULL ENABLE);
  ALTER TABLE "TB_SN_SO_WT_MST" MODIFY ("MODEL" NOT NULL ENABLE);
  ALTER TABLE "TB_SN_SO_WT_MST" MODIFY ("INCENTIVE_CFM_FLAG" NOT NULL ENABLE);
  ALTER TABLE "TB_SN_SO_WT_MST" MODIFY ("CREATE_DATE" NOT NULL ENABLE);
--------------------------------------------------------
--  Constraints for Table TB_SN_SO_WT_MST0
--------------------------------------------------------

  ALTER TABLE "TB_SN_SO_WT_MST0" ADD CONSTRAINT "TB_SN_SO_WT_MST0_PK" PRIMARY KEY ("SERIAL_NO", "MODEL") ENABLE;
  ALTER TABLE "TB_SN_SO_WT_MST0" MODIFY ("CREATE_DATE" NOT NULL ENABLE);
  ALTER TABLE "TB_SN_SO_WT_MST0" MODIFY ("SERIAL_NO" NOT NULL ENABLE);
--------------------------------------------------------
--  Constraints for Table TB_SUB_MENU
--------------------------------------------------------

  ALTER TABLE "TB_SUB_MENU" ADD PRIMARY KEY ("ID") ENABLE;
  ALTER TABLE "TB_SUB_MENU" MODIFY ("ACTIVE" NOT NULL ENABLE);
  ALTER TABLE "TB_SUB_MENU" MODIFY ("CODE" NOT NULL ENABLE);
  ALTER TABLE "TB_SUB_MENU" MODIFY ("PARENT_MENU_ID" NOT NULL ENABLE);
--------------------------------------------------------
--  Constraints for Table TB_USER
--------------------------------------------------------

  ALTER TABLE "TB_USER" ADD PRIMARY KEY ("ID") ENABLE;
  ALTER TABLE "TB_USER" MODIFY ("ACTIVE" NOT NULL ENABLE);
  ALTER TABLE "TB_USER" MODIFY ("EMPNO" NOT NULL ENABLE);
--------------------------------------------------------
--  Constraints for Table TB_USER_LEVEL
--------------------------------------------------------

  ALTER TABLE "TB_USER_LEVEL" ADD PRIMARY KEY ("ID") ENABLE;
  ALTER TABLE "TB_USER_LEVEL" MODIFY ("LEVEL_ID" NOT NULL ENABLE);
  ALTER TABLE "TB_USER_LEVEL" MODIFY ("USER_ID" NOT NULL ENABLE);
--------------------------------------------------------
--  Constraints for Table TB_USER_MENU
--------------------------------------------------------

  ALTER TABLE "TB_USER_MENU" ADD PRIMARY KEY ("ID") ENABLE;
  ALTER TABLE "TB_USER_MENU" MODIFY ("MENU_ID" NOT NULL ENABLE);
  ALTER TABLE "TB_USER_MENU" MODIFY ("USER_ID" NOT NULL ENABLE);
--------------------------------------------------------
--  Constraints for Table VNXX_DELIVERY_RDC_HIST_IF
--------------------------------------------------------

  ALTER TABLE "VNXX_DELIVERY_RDC_HIST_IF" ADD CONSTRAINT "VNXX_DELIVERY_HIST_PR_KEY" PRIMARY KEY ("PICK_NO", "LINE_ID", "DELIVERY_QTY", "DELIVERY_DATE", "PLAN_NO", "MODEL", "SUFFIX", "SHIPTO_CODE") ENABLE;
  ALTER TABLE "VNXX_DELIVERY_RDC_HIST_IF" MODIFY ("DELIVERY_STATUS" NOT NULL ENABLE);
  ALTER TABLE "VNXX_DELIVERY_RDC_HIST_IF" MODIFY ("LINE_ID" NOT NULL ENABLE);
  ALTER TABLE "VNXX_DELIVERY_RDC_HIST_IF" MODIFY ("TRANSFER_DATE" NOT NULL ENABLE);
  ALTER TABLE "VNXX_DELIVERY_RDC_HIST_IF" MODIFY ("TRANSFER_STATUS" NOT NULL ENABLE);
  ALTER TABLE "VNXX_DELIVERY_RDC_HIST_IF" MODIFY ("TRANSFER_FLAG" NOT NULL ENABLE);
  ALTER TABLE "VNXX_DELIVERY_RDC_HIST_IF" MODIFY ("IF_UNIQUE_ID" NOT NULL ENABLE);
  ALTER TABLE "VNXX_DELIVERY_RDC_HIST_IF" MODIFY ("DELIVERY_QTY" NOT NULL ENABLE);
  ALTER TABLE "VNXX_DELIVERY_RDC_HIST_IF" MODIFY ("MODEL_SUFFIX" NOT NULL ENABLE);
  ALTER TABLE "VNXX_DELIVERY_RDC_HIST_IF" MODIFY ("SHIPTO_NAME" NOT NULL ENABLE);
  ALTER TABLE "VNXX_DELIVERY_RDC_HIST_IF" MODIFY ("SHIPTO_CODE" NOT NULL ENABLE);
  ALTER TABLE "VNXX_DELIVERY_RDC_HIST_IF" MODIFY ("PICK_NO" NOT NULL ENABLE);
  ALTER TABLE "VNXX_DELIVERY_RDC_HIST_IF" MODIFY ("PLAN_NO" NOT NULL ENABLE);
  ALTER TABLE "VNXX_DELIVERY_RDC_HIST_IF" MODIFY ("DELIVERY_NO" NOT NULL ENABLE);
  ALTER TABLE "VNXX_DELIVERY_RDC_HIST_IF" MODIFY ("INV_ORG" NOT NULL ENABLE);
--------------------------------------------------------
--  Constraints for Table VNXX_EDI_RESULT
--------------------------------------------------------

  ALTER TABLE "VNXX_EDI_RESULT" MODIFY ("EDI_DATE" NOT NULL ENABLE);
  ALTER TABLE "VNXX_EDI_RESULT" ADD CONSTRAINT "PK_VNXX_EDI_RESULT_PR" PRIMARY KEY ("EDI_DATE", "EDI_TYPE") ENABLE;
--------------------------------------------------------
--  Constraints for Table VNXX_ORDER_SHIP_HIST_IF
--------------------------------------------------------

  ALTER TABLE "VNXX_ORDER_SHIP_HIST_IF" MODIFY ("UNIQUE_ID" NOT NULL ENABLE);
  ALTER TABLE "VNXX_ORDER_SHIP_HIST_IF" MODIFY ("ORDER_NO" NOT NULL ENABLE);
  ALTER TABLE "VNXX_ORDER_SHIP_HIST_IF" MODIFY ("SHIPTO_NAME" NOT NULL ENABLE);
  ALTER TABLE "VNXX_ORDER_SHIP_HIST_IF" MODIFY ("SHIPTO_CODE" NOT NULL ENABLE);
  ALTER TABLE "VNXX_ORDER_SHIP_HIST_IF" MODIFY ("INV_ORG" NOT NULL ENABLE);
  ALTER TABLE "VNXX_ORDER_SHIP_HIST_IF" ADD CONSTRAINT "VNXX_ORDER_SHIP_HIST_PR_KEY" PRIMARY KEY ("ORDER_NO", "MODEL", "SUFFIX", "SHIPTO_CODE", "ORDER_QTY", "INV_ORG") ENABLE;
--------------------------------------------------------
--  Constraints for Table VNXX_SHPCFM_IF
--------------------------------------------------------

  ALTER TABLE "VNXX_SHPCFM_IF" ADD CONSTRAINT "PK_VNXXSHPCFM_PR" PRIMARY KEY ("INTERFACE_ID") ENABLE;
  ALTER TABLE "VNXX_SHPCFM_IF" MODIFY ("SOURCE_HEADER_NO" NOT NULL ENABLE);
  ALTER TABLE "VNXX_SHPCFM_IF" MODIFY ("SOURCE_HEADER_ID" NOT NULL ENABLE);
  ALTER TABLE "VNXX_SHPCFM_IF" MODIFY ("TRANSFER_DATE" NOT NULL ENABLE);
  ALTER TABLE "VNXX_SHPCFM_IF" MODIFY ("TRANSFER_FLAG" NOT NULL ENABLE);
  ALTER TABLE "VNXX_SHPCFM_IF" MODIFY ("TRANSACTION_DATE" NOT NULL ENABLE);
  ALTER TABLE "VNXX_SHPCFM_IF" MODIFY ("ORGANIZATION_CODE" NOT NULL ENABLE);
  ALTER TABLE "VNXX_SHPCFM_IF" MODIFY ("SOURCE_TYPE_CODE" NOT NULL ENABLE);
  ALTER TABLE "VNXX_SHPCFM_IF" MODIFY ("OPERATING_UNIT_ID" NOT NULL ENABLE);
  ALTER TABLE "VNXX_SHPCFM_IF" MODIFY ("INTERFACE_ID" NOT NULL ENABLE);
--------------------------------------------------------
--  Constraints for Table VNXX_SHPSERIAL_IF
--------------------------------------------------------

  ALTER TABLE "VNXX_SHPSERIAL_IF" ADD CONSTRAINT "PK_VNXX_SERIAL_PR" PRIMARY KEY ("SERIAL_TRANSACTION_ID") ENABLE;
  ALTER TABLE "VNXX_SHPSERIAL_IF" MODIFY ("TRANSFER_DATE" NOT NULL ENABLE);
  ALTER TABLE "VNXX_SHPSERIAL_IF" MODIFY ("TRANSFER_FLAG" NOT NULL ENABLE);
  ALTER TABLE "VNXX_SHPSERIAL_IF" MODIFY ("SERIAL_NO" NOT NULL ENABLE);
  ALTER TABLE "VNXX_SHPSERIAL_IF" MODIFY ("ITEM_CODE" NOT NULL ENABLE);
  ALTER TABLE "VNXX_SHPSERIAL_IF" MODIFY ("ORGANIZATION_CODE" NOT NULL ENABLE);
  ALTER TABLE "VNXX_SHPSERIAL_IF" MODIFY ("OPERATING_UNIT_ID" NOT NULL ENABLE);
  ALTER TABLE "VNXX_SHPSERIAL_IF" MODIFY ("SOURCE_TYPE_CODE" NOT NULL ENABLE);
  ALTER TABLE "VNXX_SHPSERIAL_IF" MODIFY ("SERIAL_TRANSACTION_ID" NOT NULL ENABLE);
--------------------------------------------------------
--  Constraints for Table VNXX_SN_CBU_HIST_IF
--------------------------------------------------------

  ALTER TABLE "VNXX_SN_CBU_HIST_IF" MODIFY ("TRANSFER_DATE" NOT NULL ENABLE);
  ALTER TABLE "VNXX_SN_CBU_HIST_IF" MODIFY ("LOT_SET" NOT NULL ENABLE);
  ALTER TABLE "VNXX_SN_CBU_HIST_IF" MODIFY ("LOT_BOX" NOT NULL ENABLE);
  ALTER TABLE "VNXX_SN_CBU_HIST_IF" MODIFY ("SUFFIX" NOT NULL ENABLE);
  ALTER TABLE "VNXX_SN_CBU_HIST_IF" MODIFY ("MODEL_CODE" NOT NULL ENABLE);
  ALTER TABLE "VNXX_SN_CBU_HIST_IF" MODIFY ("LOT_ID" NOT NULL ENABLE);
--------------------------------------------------------
--  Constraints for Table VNXX_SN_CDC_HIST_IF
--------------------------------------------------------

  ALTER TABLE "VNXX_SN_CDC_HIST_IF" MODIFY ("MODEL_SUFFIX" NOT NULL ENABLE);
  ALTER TABLE "VNXX_SN_CDC_HIST_IF" MODIFY ("UNIQUE_ID" NOT NULL ENABLE);
  ALTER TABLE "VNXX_SN_CDC_HIST_IF" MODIFY ("TRANSFER_FLAG" NOT NULL ENABLE);
  ALTER TABLE "VNXX_SN_CDC_HIST_IF" MODIFY ("TRANSFER_STATUS" NOT NULL ENABLE);
  ALTER TABLE "VNXX_SN_CDC_HIST_IF" MODIFY ("TRANSFER_DATE" NOT NULL ENABLE);
  ALTER TABLE "VNXX_SN_CDC_HIST_IF" MODIFY ("ORDER_NO" NOT NULL ENABLE);
  ALTER TABLE "VNXX_SN_CDC_HIST_IF" MODIFY ("SHIPTO_CODE" NOT NULL ENABLE);
  ALTER TABLE "VNXX_SN_CDC_HIST_IF" MODIFY ("SERIAL_NO" NOT NULL ENABLE);
  ALTER TABLE "VNXX_SN_CDC_HIST_IF" MODIFY ("LOADPLAN_NO" NOT NULL ENABLE);
  ALTER TABLE "VNXX_SN_CDC_HIST_IF" MODIFY ("INV_ORG" NOT NULL ENABLE);
--------------------------------------------------------
--  Constraints for Table VNXX_SN_RDC_HIST_IF
--------------------------------------------------------

  ALTER TABLE "VNXX_SN_RDC_HIST_IF" ADD CONSTRAINT "VNXX_SN_RDC_HIST_PK" PRIMARY KEY ("INV_ORG", "SERIAL_NO", "MODEL", "SUFFIX", "OUT_DATE") ENABLE;
  ALTER TABLE "VNXX_SN_RDC_HIST_IF" MODIFY ("TRANSFER_STATUS" NOT NULL ENABLE);
  ALTER TABLE "VNXX_SN_RDC_HIST_IF" MODIFY ("TRANSFER_FLAG" NOT NULL ENABLE);
  ALTER TABLE "VNXX_SN_RDC_HIST_IF" MODIFY ("TRANSFER_DATE" NOT NULL ENABLE);
  ALTER TABLE "VNXX_SN_RDC_HIST_IF" MODIFY ("OUT_DATE" NOT NULL ENABLE);
  ALTER TABLE "VNXX_SN_RDC_HIST_IF" MODIFY ("MODEL" NOT NULL ENABLE);
  ALTER TABLE "VNXX_SN_RDC_HIST_IF" MODIFY ("SERIAL_NO" NOT NULL ENABLE);
  ALTER TABLE "VNXX_SN_RDC_HIST_IF" MODIFY ("EDI_NO" NOT NULL ENABLE);
  ALTER TABLE "VNXX_SN_RDC_HIST_IF" MODIFY ("INV_ORG" NOT NULL ENABLE);
--------------------------------------------------------
--  Constraints for Table VXH_ORDER_SHIP_HIST
--------------------------------------------------------

  ALTER TABLE "VXH_ORDER_SHIP_HIST" ADD CONSTRAINT "PK_XVH_ORDER_SHIP_HIST_PR" PRIMARY KEY ("INV_ORG", "SHIPTO_CODE", "ORDER_NO", "LINE_NO", "ORDER_QTY", "RELEASE_QTY", "MODEL", "SUFFIX") ENABLE;
  ALTER TABLE "VXH_ORDER_SHIP_HIST" MODIFY ("SUFFIX" NOT NULL ENABLE);
  ALTER TABLE "VXH_ORDER_SHIP_HIST" MODIFY ("MODEL" NOT NULL ENABLE);
  ALTER TABLE "VXH_ORDER_SHIP_HIST" MODIFY ("RELEASE_QTY" NOT NULL ENABLE);
  ALTER TABLE "VXH_ORDER_SHIP_HIST" MODIFY ("ORDER_QTY" NOT NULL ENABLE);
  ALTER TABLE "VXH_ORDER_SHIP_HIST" MODIFY ("LINE_NO" NOT NULL ENABLE);
  ALTER TABLE "VXH_ORDER_SHIP_HIST" MODIFY ("ORDER_NO" NOT NULL ENABLE);
  ALTER TABLE "VXH_ORDER_SHIP_HIST" MODIFY ("SHIPTO_CODE" NOT NULL ENABLE);
  ALTER TABLE "VXH_ORDER_SHIP_HIST" MODIFY ("INV_ORG" NOT NULL ENABLE);
--------------------------------------------------------
--  Constraints for Table XVH_SN_RDC_HIST
--------------------------------------------------------

  ALTER TABLE "XVH_SN_RDC_HIST" ADD CONSTRAINT "XVH_SN__RDC_HIST_PK" PRIMARY KEY ("SERIAL_NO", "EDI_NO", "INV_ORG", "MODEL", "SUFFIX") ENABLE;
  ALTER TABLE "XVH_SN_RDC_HIST" MODIFY ("SUFFIX" NOT NULL ENABLE);
  ALTER TABLE "XVH_SN_RDC_HIST" MODIFY ("MODEL" NOT NULL ENABLE);
  ALTER TABLE "XVH_SN_RDC_HIST" MODIFY ("MODEL_SUFFIX" NOT NULL ENABLE);
  ALTER TABLE "XVH_SN_RDC_HIST" MODIFY ("SERIAL_NO" NOT NULL ENABLE);
  ALTER TABLE "XVH_SN_RDC_HIST" MODIFY ("EDI_NO" NOT NULL ENABLE);
  ALTER TABLE "XVH_SN_RDC_HIST" MODIFY ("INV_ORG" NOT NULL ENABLE);
--------------------------------------------------------
--  Constraints for Table XX_TEMP
--------------------------------------------------------

  ALTER TABLE "XX_TEMP" ADD CONSTRAINT "PR_XX_TEMP" UNIQUE ("LOT_BOX") ENABLE;
--------------------------------------------------------
--  DDL for Trigger TRG_SHOP_REG_SMS
--------------------------------------------------------

  CREATE OR REPLACE TRIGGER "TRG_SHOP_REG_SMS" 
  BEFORE  
  INSERT OR UPDATE
  ON TB_CM_SHOP_INF
  REFERENCING NEW AS NEW OLD AS OLD
  FOR EACH ROW
DECLARE
  v_msgbody   VARCHAR2(200) := NULL;
  -- LOCAL VARIABLES HERE
BEGIN
  IF INSERTING THEN
    IF :NEW.CELL_NO#1 IS NOT NULL AND :NEW.CELL_NO#2 IS NOT NULL THEN
      v_msgbody := pk_sms_mst.FN_GET_MT_RESPONSE(pk_sms_mst.const_shp_reg_su, '$'||'8069');
       
      INSERT INTO tb_mt_hist (moseq, cell_no      , cmdcode, msgbody  , resp_type)
      VALUES                 (0    ,:NEW.CELL_NO#1, 'LGDK' , v_msgbody, pk_sms_mst.const_shp_reg_su);
       
      INSERT INTO tb_mt_hist (moseq, cell_no      , cmdcode, msgbody  , resp_type)
      VALUES                 (0    ,:NEW.CELL_NO#2, 'LGDK' , v_msgbody, pk_sms_mst.const_shp_reg_su);
    ELSIF :NEW.CELL_NO#1 IS NOT NULL THEN
      v_msgbody := pk_sms_mst.FN_GET_MT_RESPONSE(pk_sms_mst.const_shp_reg_su, '$'||'8069');
       
      INSERT INTO tb_mt_hist (moseq, cell_no      , cmdcode, msgbody  , resp_type)
      VALUES                 (0    ,:NEW.CELL_NO#1, 'LGDK' , v_msgbody, pk_sms_mst.const_shp_reg_su);
    ELSIF :NEW.CELL_NO#2 IS NOT NULL THEN
      v_msgbody := pk_sms_mst.FN_GET_MT_RESPONSE(pk_sms_mst.const_shp_reg_su, '$'||'8069');
       
      INSERT INTO tb_mt_hist (moseq, cell_no      , cmdcode, msgbody  , resp_type)
      VALUES                 (0    ,:NEW.CELL_NO#2, 'LGDK' , v_msgbody, pk_sms_mst.const_shp_reg_su);
    END IF;
  END IF;
 /* IF UPDATING THEN
  END;  */  
  
END TRG_SHOP_REG_SMS;

/
ALTER TRIGGER "TRG_SHOP_REG_SMS" ENABLE;
--------------------------------------------------------
--  DDL for Trigger TRG_MO_MT_MST
--------------------------------------------------------

  CREATE OR REPLACE TRIGGER "TRG_MO_MT_MST" 
  AFTER 
       INSERT or UPDATE
  ON TB_MO_HIST  
  referencing new as new old as old
  for each row
    
DECLARE
  --/const variants
 /* v_cmdcode_dk_df varchar2(6):='LGDK';
  v_cmdcode_bh_df varchar2(6):='LGBH';*/
  --v_cmdcode_invld varchar2(6):='INVALD'; 
  --v_cpid_df       varchar2(5):='10312';
 
  --/new variants
  v_cmdcode      varchar2(160) := UPPER(:new.cmdcode);
  v_moseq        varchar2(20)  := :new.moseq;
  v_motst        timestamp     := :new.mo_tst;  
  v_msisdn       varchar2(20)  := :new.msisdn;
  v_msgbody      varchar2(160) := UPPER(:new.msgbody); 
  v_receive_date varchar2(20)  := :new.receive_time;
  
  --v_ck_cmdcode varchar2(1);
  --v_reptype_invld varchar2(5);
  v_sms_rep    sms_init_type;
BEGIN
    v_sms_rep:= FN_SMS_INIT_VAL(v_moseq, v_cmdcode, v_msgbody, v_msisdn, v_receive_date);
     
     insert into tb_mt_send_hist
                (moseq,
                 msisdn,
                 cmdcode,
                 rep_type,
                 msgbody,
                 mo_msgbody,
                 mo_tst)
     values     (v_moseq,
                 v_msisdn,
                 v_cmdcode,
                 v_sms_rep.rep_type,
                 v_sms_rep.rep_smg,
                 v_msgbody,
                 v_motst);                          
exception
  when DUP_VAL_ON_INDEX then null;
                      
end TRG_MO_MT_MST;

/
ALTER TRIGGER "TRG_MO_MT_MST" DISABLE;
--------------------------------------------------------
--  DDL for Trigger TRG_MT_REP_LEN
--------------------------------------------------------

  CREATE OR REPLACE TRIGGER "TRG_MT_REP_LEN" 
  before insert or update on TB_MT_SMS_RESP_MSG  
  referencing new as new old as old
  for each row
    
declare
  -- local variables here
begin
  :new.msgbody_len :=length(:new.resp_msg#1) + length(:new.resp_msg#2);
end TRG_MT_REP_LEN;

/
ALTER TRIGGER "TRG_MT_REP_LEN" ENABLE;
--------------------------------------------------------
--  DDL for Trigger TRG_SN_SO_DEALERS
--------------------------------------------------------

  CREATE OR REPLACE TRIGGER "TRG_SN_SO_DEALERS" 
  BEFORE INSERT 
  ON                      TB_SN_SO_DEALERS  
  REFERENCING  OLD AS OLD NEW AS NEW
  FOR EACH ROW
DECLARE
  --v_edi_no                VARCHAR2(20) := LTRIM(RTRIM(:NEW.EDI_NO));
  v_serial_no             VARCHAR2(50) := NULL;
  v_edi_no                VARCHAR2(30) := :NEW.EDI_NO;
  v_sal_sn                VARCHAR2(50) := NULL;
  v_box_no                VARCHAR2(50) := UPPER(LTRIM(RTRIM(:NEW.BOX_NO)));
  v_prod_model            VARCHAR2(50) := NULL;
  v_sal_model             VARCHAR2(50) := NULL;
  v_edi_model             VARCHAR2(50) := :NEW.MODEL;
  v_prod_suffix           VARCHAR2(50) := NULL;
  v_sal_suffix            VARCHAR2(50) := NULL;
  v_sellin_date           DATE;
  v_box_len               NUMBER       := LENGTH(v_box_no);
  v_user_cell             VARCHAR2(20) := :NEW.EU_CELL; 
  v_edi_file              VARCHAR2(20) := :NEW.EDI_FILE;                    
BEGIN
  CASE                    
    WHEN                  v_box_len    = 0 THEN
      v_serial_no                      := 'NA'; 
    WHEN                  v_box_len    < 14 THEN
      v_serial_no                      := UPPER(LTRIM(RTRIM(v_box_no))); 
    ELSE
      BEGIN 
        SELECT                         customer_model_serial_no
                                      ,SUBSTR(production_model_suffix_code,1,INSTR(production_model_suffix_code,'.',1)-1)
                                      ,SUBSTR(production_model_suffix_code,INSTR(production_model_suffix_code,'.',1)+1, LENGTH(production_model_suffix_code)-INSTR(production_model_suffix_code,'.',1)) 
        INTO                           v_serial_no
                                      ,v_prod_model
                                      ,v_prod_suffix 
        FROM                           XXOWMM_MES_SN2_S_IF@DBL_MES
        WHERE                          item_serial_no      = v_box_no;
      EXCEPTION
        WHEN NO_DATA_FOUND THEN
          BEGIN
            SELECT                     serial_no
            INTO                       v_serial_no
            FROM                       LKALSMGR.TBL_SERIAL_NO_PRINTED_SERIAL@DBL_MES
            WHERE                      serial_no LIKE (SELECT '%'||serial
                                                       FROM   LKALSMGR.TBL_SERIAL_NO_PRINTED_SERIAL@DBL_MES
                                                       WHERE  serial_no = v_box_no) 
            AND                        work_order   = (SELECT work_order
                                                       FROM   LKALSMGR.TBL_SERIAL_NO_PRINTED_SERIAL@DBL_MES
                                                       WHERE  serial_no = v_box_no)
            AND                        serial_no_usage LIKE 'DISPLAY_SET_BRAND%';
          EXCEPTION
            WHEN OTHERS THEN           v_serial_no            := v_box_no;   
          END;
        WHEN OTHERS THEN               v_serial_no            := v_box_no;                                                           
      END;
  END CASE;
  BEGIN
    SELECT                             serial_no
                                      ,model
                                      ,suffix
                                      ,out_date
    INTO                               v_sal_sn
                                      ,v_sal_model
                                      ,v_sal_suffix
                                      ,v_sellin_date                    
    FROM                               VW_SN_NM
    WHERE                              serial_no    = v_serial_no
    AND                                LTRIM(LTRIM(model)) = v_edi_model
    AND                                out_date            =(SELECT MAX(out_date)
                                                             FROM   VW_SN_NM
                                                             WHERE  serial_no                 = v_serial_no
                                                             AND    RTRIM(LTRIM(model))       = v_edi_model);
                   
    :NEW.SERIAL_NO                     := v_sal_sn;
    :NEW.MODEL                         := v_sal_model;
    :NEW.SUFFIX                        := v_sal_suffix;
    :NEW.SELLIN_DATE                   := v_sellin_date;
    :NEW.VRF_FLAG                      := 'Y';
    
    /*UPDATE  TB_EDI_RESULT
    SET     done_cnt                   = done_cnt +1
           ,done_item                  = done_item || '/' || v_edi_no
    WHERE   edi_date                   = TO_CHAR(sysdate,'YYYYMMDD')
    AND     edi_file                   = v_edi_file;*/
    
   -- COMMIT;
  EXCEPTION
    WHEN OTHERS THEN
      :NEW.SERIAL_NO                   := v_serial_no;
      :NEW.MODEL                       := v_edi_model;
      :NEW.VRF_FLAG                    := 'N';
      
     /* UPDATE  TB_EDI_RESULT
      SET     fail_cnt                 = fail_cnt +1
             ,fail_item                = fail_item || '/' || v_edi_no
      WHERE   edi_date                 = TO_CHAR(sysdate,'YYYYMMDD')
      AND     edi_file                 = v_edi_file;*/
    
   --   COMMIT;
  END;
  IF :NEW.EU_CELL              IS NOT NULL THEN
    SELECT                            DECODE(SUBSTR(v_user_cell,1,2), '84', v_user_cell
                                     ,'84'|| DECODE( SUBSTR(v_user_cell,1,1)
                                     ,'0'
                                     ,SUBSTR(v_user_cell, 2, LENGTH(v_user_cell)-1)
                                     ,v_user_cell))
    INTO                              v_user_cell             
    FROM                              DUAL;
      
    :NEW.EU_CELL                      := v_user_cell;           
  END IF;    
END TRG_SN_SO_DEALERS;

/
ALTER TRIGGER "TRG_SN_SO_DEALERS" ENABLE;
--------------------------------------------------------
--  DDL for Trigger TRG_DELEVERY_RDC_HIST
--------------------------------------------------------

  CREATE OR REPLACE TRIGGER "TRG_DELEVERY_RDC_HIST" 
  before
    insert or update
    on vnxx_delivery_rdc_hist_if

  referencing new as new old as old
  for each row

declare
  -- local variables here
 /* v_pick_no       varchar2(16) := :NEW."PICK_NO";
  v_line_id       varchar2(2)  := :NEW."LINE_ID";
  v_delivery_qty  varchar2(5)  := :NEW."DELIVERY_QTY";
  v_delivery_date varchar2(16) := TO_CHAR(:NEW."DELIVERY_DATE",'YYYYMMDDHH24MISS');
  v_plan_no       varchar2(20) := :NEW."PLAN_NO";*/

 /* v_delivery_dpl varchar2(1);*/

BEGIN
   insert into  TB_DELIVERY_RDC_HIST
                (  inv_org
                  ,delivery_no
                  ,plan_no
                  ,pick_no
                  ,pick_date
                  ,shipto_code
                  ,shipto_name
                  ,ship_date
                  ,model_suffix
                  ,model
                  ,suffix
                  ,delivery_address
                  ,delivery_qty
                  ,delivery_date
                  ,line_id
                  ,delivery_status            
                  )
     values
               (  :NEW."INV_ORG"
                 ,:NEW."DELIVERY_NO"
                 ,:NEW."PLAN_NO"
                 ,:NEW."PICK_NO"
                 ,:NEW."PICK_DATE"
                 ,:NEW."SHIPTO_CODE"
                 ,:NEW."SHIPTO_NAME"
                 ,:NEW."SHIP_DATE"
                 ,:NEW."MODEL_SUFFIX"
                 ,:NEW."MODEL"
                 ,:NEW."SUFFIX"
                 ,:NEW."DELIVERY_ADDRESS"
                 ,:NEW."DELIVERY_QTY"
                 ,:NEW."DELIVERY_DATE"
                 ,:NEW."LINE_ID"
                 ,:NEW."DELIVERY_STATUS"
                  );
           
     :NEW."TRANSFER_FLAG" :='0';
     :NEW."TRANSFER_STATUS":='Y';
  EXCEPTION 
    WHEN DUP_VAL_ON_INDEX THEN
      :NEW."TRANSFER_STATUS":='D';
      :NEW."TRANSFER_FLAG":='N';
      NULL;
    WHEN OTHERS THEN NULL;
     -- dbms_output.put_line(v_delivery_dpl) ;
 
end TRG_DELEVERY_WH_HIST;

/
ALTER TRIGGER "TRG_DELEVERY_RDC_HIST" ENABLE;
--------------------------------------------------------
--  DDL for Trigger TRG_ORDER_SHIP_HIST
--------------------------------------------------------

  CREATE OR REPLACE TRIGGER "TRG_ORDER_SHIP_HIST" 
  before
    insert or update
    on VNXX_ORDER_SHIP_HIST_IF

  referencing new as new old as old
  for each row

declare
  -- local variables here
  --v_order_no     varchar2(18)  := :NEW."ORDER_NO";
  --v_shipto_code  varchar2(25)  := :NEW."SHIPTO_CODE";
  v_prod_div     varchar2(5)   := :NEW."PROD_DIV";
 -- v_model_suffix varchar2(30)  := :NEW."MODEL_SUFFIX";
  v_model        varchar2(20)  := :NEW."MODEL";
  v_suffix       varchar2(20)  := :NEW."SUFFIX";
--  v_line_no      varchar2(4)   := :NEW."LINE_NO";
 -- v_line_status  VARCHAR2(100) := :NEW."LINE_STATUS";
                
 -- v_order_ship_dpl varchar2(1);
  v_prod_div_dpl   varchar2(1);
--------------------------------------------------------------  
BEGIN
    BEGIN --/Insert model info to tb_cm_model_cat
      SELECT 'Y'
      INTO   v_prod_div_dpl
      FROM   tb_cm_model_cat
      WHERE  LTRIM(RTRIM(model)) = LTRIM(RTRIM(v_model));
    EXCEPTION
      WHEN NO_DATA_FOUND THEN
        INSERT INTO tb_cm_model_cat
                   ( prod_l1
                    ,model
                    ,suffix)
        VALUES     
                   ( v_prod_div
                    ,v_model
                    ,v_suffix);
      WHEN TOO_MANY_ROWS THEN NULL;                                                                        
    END;
    ----------------------------------------------------------
    BEGIN
      INSERT INTO TB_ORDER_SHIP_HIST
                ( inv_org
                 ,shipto_code
                 ,shipto_name
                 ,order_no
                 ,line_no
                 ,line_status
                 ,prod_div
                 ,model_suffix
                 ,model
                 ,suffix
                 ,order_qty
                 ,release_qty
                 ,unit_sell_price
                 ,order_amt
                 ,shipping_method
                 ,request_shipped_date
                 ,request_arrival_date
                 ,shipping_remark
                 ,invoice_no
                 ,invoice_date
                 ,booked_date
                 ,pick_no
                 ,pick_seq
                 ,pick_release_date
                 ,delivery_no
                 ,subinventory
                 ,creation_date
                 ,billto_code
                 ,billto_name
                 ,saleschannel_code
                 ,saleschannel_name
                 ,created_by
                 ,salesperson
               )
     VALUES
               ( :NEW."INV_ORG"
                ,:NEW."SHIPTO_CODE"
                ,:NEW."SHIPTO_NAME"
                ,:NEW."ORDER_NO"
                ,:NEW."LINE_NO"
                ,:NEW."LINE_STATUS"
                ,:NEW."PROD_DIV"
                ,:NEW."MODEL_SUFFIX"
                ,:NEW."MODEL"
                ,:NEW."SUFFIX"
                ,:NEW."ORDER_QTY"
                ,:NEW."RELEASE_QTY"
                ,:NEW."UNIT_SELL_PRICE"
                ,:NEW."ORDER_AMT"
                ,:NEW."SHIPPING_METHOD"
                ,:NEW."REQUEST_SHIPPED_DATE"
                ,:NEW."REQUEST_ARRIVAL_DATE"
                ,:NEW."SHIPPING_REMARK"
                ,:NEW."INVOICE_NO"
                ,:NEW."INVOICE_DATE"
                ,:NEW."BOOKED_DATE"
                ,:NEW."PICK_NO"
                ,:NEW."PICK_SEQ"
                ,:NEW."PICK_RELEASE_DATE"
                ,:NEW."DELIVERY_NO"
                ,:NEW."SUBINVENTORY"
                ,:NEW."CREATION_DATE"
                ,:NEW."BILLTO_CODE"
                ,:NEW."BILLTO_NAME"
                ,:NEW."SALESCHANNEL_CODE"
                ,:NEW."SALESCHANNEL_NAME"
                ,:NEW."CREATED_BY"
                ,:NEW."SALESPERSON"                        
                );
    EXCEPTION
      WHEN DUP_VAL_ON_INDEX THEN NULL;
    END;  
END TRG_ORDER_SHIP_HIST;

/
ALTER TRIGGER "TRG_ORDER_SHIP_HIST" DISABLE;
--------------------------------------------------------
--  DDL for Trigger TRG_SN_CDC_HIST
--------------------------------------------------------

  CREATE OR REPLACE TRIGGER "TRG_SN_CDC_HIST" 
  BEFORE
    INSERT OR UPDATE
  ON vnxx_sn_cdc_hist_if
  REFERENCING NEW AS NEW OLD AS OLD
  FOR EACH ROW

DECLARE
  -- local variables here
  v_lot_box  varchar2(50) := :NEW.BOX_NO;
  v_lot_sn   varchar2(50) :=  null;
   
  v_sn_len   number(2);
  v_sn_l     number(2);
  v_sn_r     number(2);
  
BEGIN
  BEGIN
    SELECT DISTINCT(serial_no)
      INTO v_lot_sn
      FROM (
              SELECT DECODE(lot_set, NULL, lot_box, lot_set) serial_no
              FROM   TB_WP_ADDWMSINPLOG@DBL_MES
              WHERE  actualtime = (SELECT max(actualtime)
                                   FROM   TB_WP_ADDWMSINPLOG@DBL_MES
                                   WHERE  lot_box = v_lot_box)
              AND    lot_box = v_lot_box
              GROUP BY lot_box, lot_set
            UNION
              SELECT serial_no
              FROM lkalsmgr.tbl_serial_no_printed_serial@dbl_mes a,
                   (SELECT work_order, serial 
                    FROM lkalsmgr.tbl_serial_no_printed_serial@dbl_mes
                    WHERE serial_no = v_lot_box) b
              WHERE  a.work_order= b.work_order
              AND    a.serial = b.serial
              AND    a.serial_no_usage LIKE 'DISPLAY_SET%');
  ----------------------------------------------------------------------------------
  EXCEPTION
    WHEN NO_DATA_FOUND THEN
      BEGIN
         v_lot_sn := :NEW.BOX_NO;
         v_sn_len :=  LENGTH(v_lot_sn);
             
         SELECT TO_NUMBER(sn_left,'99'), TO_NUMBER(sn_right,'99')
         INTO   v_sn_l,  v_sn_r
         FROM   tb_cm_sn_inf_dec
         WHERE  sn_len = v_sn_len;

         v_lot_sn := SUBSTR(v_lot_sn, v_sn_l +1, (v_sn_len- v_sn_l- v_sn_r));
      --------------------------------------------------------------------------
      EXCEPTION
        WHEN NO_DATA_FOUND THEN
          INSERT INTO tb_sn_cdc_hist
                     ( inv_org
                      ,loadplan_no
                      ,model_suffix
                      ,model
                      ,suffix
                      ,serial_no
                      ,box_no
                      ,shipto_code
                      ,shipto_name
                      ,shipto_date
                      ,order_no
                      ,closed_date
                      ,invoice_no
                      ,invoice_date
                      ,customer_code
                      ,customer_name)
          VALUES                  
                     ( :new.inv_org
                      ,:new.loadplan_no
                      ,:new.model_suffix
                      ,:new.model
                      ,:new.suffix 
                      ,:new.serial_no
                      ,:new.box_no
                      ,:new.shipto_code
                      ,:new.shipto_name
                      ,:new.shipto_date
                      ,:new.order_no
                      ,:new.closed_date
                      ,:new.invoice_no
                      ,:new.invoice_date
                      ,:new.customer_code
                      ,:new.customer_name
                        );
         :new.transfer_flag  :='0';
         :new.transfer_status:='Y';
         null;
      END;   
  END;
  -----------------------------------------------------------------------------------
  BEGIN
     INSERT INTO tb_sn_cdc_hist
               ( inv_org
                ,loadplan_no
                ,model_suffix
                ,model
                ,suffix
                ,serial_no
                ,box_no
                ,shipto_code
                ,shipto_name
                ,shipto_date
                ,order_no
                ,closed_date
                ,invoice_no
                ,invoice_date
                ,customer_code
                ,customer_name)
      VALUES                  
               ( :new.inv_org
                ,:new.loadplan_no
                ,:new.model_suffix
                ,:new.model
                ,:new.suffix
                ,v_lot_sn
                ,:new.serial_no
                ,:new.shipto_code
                ,:new.shipto_name
                ,:new.shipto_date
                ,:new.order_no
                ,:new.closed_date
                ,:new.invoice_no
                ,:new.invoice_date
                ,:new.customer_code
                ,:new.customer_name
               );
       :new.transfer_flag  :='0';
       :new.transfer_status:='Y';                           
  EXCEPTION
    WHEN DUP_VAL_ON_INDEX THEN
      INSERT INTO tb_edi_dup_temp
        (SELECT :new.order_no || '/' || :new.serial_no
         FROM dual) ;
          
  END;    
END trg_sn_cdc_hist;

/
ALTER TRIGGER "TRG_SN_CDC_HIST" ENABLE;
--------------------------------------------------------
--  DDL for Trigger TRG_SN_RDC_HIST_IF
--------------------------------------------------------

  CREATE OR REPLACE TRIGGER "TRG_SN_RDC_HIST_IF" 
  BEFORE
    INSERT OR UPDATE
  ON VNXX_SN_RDC_HIST_IF
  REFERENCING new as new old as old
  FOR EACH ROW

DECLARE
  v_sn_no   varchar2(50)  := :new.serial_no;
  v_box_no  varchar2(50)  := :new.box_no;
  v_sn_len  number(2)     := length(v_sn_no);
  v_sn_l    number(2)     := 0;
  v_sn_r    number(2)     := 0;
  v_sn_type varchar2(50)  := null;
------------------------------------------------------------------------------------------
BEGIN
    --/Tracking set serial# by box serial# in case product is production/cbu
  BEGIN
    SELECT lot_set
    INTO   v_sn_no
    FROM  ( SELECT     distinct(DECODE(p_mes.lot_set, null, lot_box, lot_set)) lot_set
                      ,p_mes.lot_box
            FROM       TB_WP_ADDWMSINPLOG@DBL_MES p_mes
            GROUP BY   p_mes.lot_set
                      ,p_mes.lot_box
          UNION
            SELECT     cbu_mes.lot_set
                      ,cbu_mes.lot_box 
            FROM       vnxx_sn_cbu_hist_if cbu_mes) a
    WHERE  a.lot_box = v_box_no;
                
    v_sn_len := length(v_sn_no);
  ----------------------------------------------------------------------------------------               
  EXCEPTION
    WHEN NO_DATA_FOUND THEN
      BEGIN
        SELECT DISTINCT(serial_no)
        INTO   v_sn_no 
        FROM lkalsmgr.tbl_serial_no_printed_serial@dbl_mes a,
            (SELECT work_order, serial 
             FROM lkalsmgr.tbl_serial_no_printed_serial@dbl_mes
             WHERE serial_no = v_box_no) b
        WHERE  a.work_order= b.work_order
        AND    a.serial = b.serial
        AND    a.serial_no_usage LIKE 'DISPLAY_SET%'; 
     -------------------------------------------------------------------------------------
     EXCEPTION
       WHEN NO_DATA_FOUND THEN  
         v_sn_no  := :new.serial_no;
         v_sn_len := length(v_sn_no);
         
       WHEN TOO_MANY_ROWS THEN null;
     END; 
    WHEN TOO_MANY_ROWS THEN null;
  END;
  ----------------------------------------------------------------------------------------            
  IF v_sn_len NOT IN (10,12,13) THEN  --/Check serial format definetion
    BEGIN
       SELECT TO_NUMBER(sn_left,'99'), TO_NUMBER(sn_right,'99'), set_box
       INTO   v_sn_l,  v_sn_r, v_sn_type
       FROM   tb_cm_sn_inf_dec
       WHERE  to_number(sn_len) = v_sn_len;

       v_sn_no := SUBSTR(v_sn_no, v_sn_l + 1, (v_sn_len-v_sn_l-v_sn_r));
                  
    EXCEPTION
      WHEN NO_DATA_FOUND THEN 
        INSERT INTO tb_sn_rdc_hist
             ( inv_org
              ,edi_no
              ,serial_no
              ,box_no
              ,model_suffix
              ,model
              ,suffix
              ,ship_no
              ,line_no
              ,out_date
              )
        VALUES
             ( :new.inv_org
              ,:new.edi_no
              ,v_sn_no
              ,:new.box_no
              ,:new.model_suffix
              ,:new.model
              ,:new.suffix
              ,:new.ship_no
              ,:new.line_no
              ,:new.out_date
              );
          
        :new.transfer_flag    :='0';
        :new.transfer_status  :='Y';
        null;
    END;
  END IF;
  --------------------------------------------------------------------------------------
  BEGIN --/Normal insert to tb_sn_rdc_hist
    INSERT INTO tb_sn_rdc_hist
               ( inv_org
                ,edi_no
                ,serial_no
                ,box_no
                ,model_suffix
                ,model
                ,suffix
                ,ship_no
                ,line_no
                ,out_date
                )
    VALUES
               ( :new.inv_org
                ,:new.edi_no
                ,v_sn_no
                ,:new.box_no
                ,:new.model_suffix
                ,:new.model
                ,:new.suffix
                ,:new.ship_no
                ,:new.line_no
                ,:new.out_date
                );
    :new.transfer_flag    :='0';
    :new.transfer_status  :='Y';
               
  EXCEPTION
    WHEN DUP_VAL_ON_INDEX THEN 
      :new.transfer_flag    :='D';
      :new.transfer_status  :='N';
      null;
  END;

END trg_sn_rdc_hist;

/
ALTER TRIGGER "TRG_SN_RDC_HIST_IF" ENABLE;
